/* UnderlineNav */ .UnderlineNav { display: flex; min-height: var(--base-size-48); overflow-x: auto; overflow-y: hidden; /* stylelint-disable-next-line primer/box-shadow */ box-shadow: inset 0 -1px 0 var(--borderColor-muted); -webkit-overflow-scrolling: auto; justify-content: space-between; & .Counter { /* stylelint-disable-next-line primer/spacing */ margin-left: var(--control-medium-gap); color: var(--fgColor-default); background-color: var(--bgColor-neutral-muted, var(--color-neutral-muted)); } & .Counter--primary { color: var(--fgColor-onEmphasis); background-color: var(--bgColor-neutral-emphasis); } } .UnderlineNav-body { display: flex; align-items: center; gap: var(--control-medium-gap); list-style: none; } .UnderlineNav-item { position: relative; display: flex; /* stylelint-disable-next-line primer/spacing */ padding: 0 var(--control-medium-paddingInline-condensed); font-size: var(--text-body-size-medium); /* stylelint-disable-next-line primer/typography */ line-height: 30px; color: var(--fgColor-default); text-align: center; white-space: nowrap; cursor: pointer; background-color: transparent; border: 0; border-radius: var(--borderRadius-medium); align-items: center; &:hover, &:focus, &:focus-visible { color: var(--fgColor-default); text-decoration: none; border-bottom-color: var(--borderColor-neutral-muted); outline-offset: -2px; transition: border-bottom-color 0.12s ease-out; } /* renders a visibly hidden "copy" of the label in bold, reserving box space for when label becomes bold on selected */ & [data-content]::before { display: block; height: 0; font-weight: var(--base-text-weight-semibold); visibility: hidden; content: attr(data-content); } /* increase touch target area */ &::before { @mixin minTouchTarget 48px; } /* hover state was "sticking" on mobile after click */ @media (pointer: fine) { &:hover { color: var(--fgColor-default); text-decoration: none; background: var(--control-transparent-bgColor-hover); transition: background 0.12s ease-out; } } &.selected, &[role='tab'][aria-selected='true'], &[aria-current]:not([aria-current='false']) { font-weight: var(--base-text-weight-semibold); color: var(--fgColor-default); border-bottom-color: var(--underlineNav-borderColor-active); /* current/selected underline */ &::after { position: absolute; right: 50%; bottom: calc(50% - var(--base-size-24)); /* 48px total height / 2 (24px) + 1px */ z-index: 1; /* raise above full-width flash banner */ width: 100%; height: 2px; content: ''; /* stylelint-disable-next-line primer/colors */ background: var(--underlineNav-borderColor-active); border-radius: var(--borderRadius-medium); transform: translate(50%, -50%); } } } .UnderlineNav--right { justify-content: flex-end; & .UnderlineNav-actions { flex: 1 1 auto; } } .UnderlineNav-actions { align-self: center; } .UnderlineNav--full { display: block; /* required for underline to align with additional wrapper element */ & .UnderlineNav-body { min-height: var(--base-size-48); } } .UnderlineNav-octicon { display: inline !important; /* stylelint-disable-next-line primer/spacing */ margin-right: var(--control-medium-gap); color: var(--fgColor-muted); fill: var(--fgColor-muted); } .UnderlineNav-container { display: flex; justify-content: space-between; }