/* UnderlineNav */ .UnderlineNav { display: flex; min-height: var(--base-size-48, 48px); overflow-x: auto; overflow-y: hidden; box-shadow: inset 0 -1px 0 var(--color-border-muted); -webkit-overflow-scrolling: auto; justify-content: space-between; & .Counter { margin-left: var(--yattho-control-medium-gap, 8px); color: var(--color-fg-default); background-color: var(--color-neutral-muted); } & .Counter--primary { color: var(--color-fg-on-emphasis); background-color: var(--color-neutral-emphasis); } } .UnderlineNav-body { display: flex; align-items: center; gap: var(--yattho-control-medium-gap, 8px); list-style: none; } .UnderlineNav-item { position: relative; display: flex; padding: 0 var(--yattho-control-medium-paddingInline-condensed, 8px); font-size: var(--yattho-text-body-size-medium, 14px); line-height: 30px; color: var(--color-fg-default); text-align: center; white-space: nowrap; cursor: pointer; background-color: transparent; border: 0; border-radius: var(--yattho-borderRadius-medium, 6px); align-items: center; &:hover, &:focus, &:focus-visible { color: var(--color-fg-default); text-decoration: none; border-bottom-color: var(--color-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, 600); 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(--color-fg-default); text-decoration: none; background: var(--color-action-list-item-default-hover-bg); 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, 600); color: var(--color-fg-default); border-bottom-color: var(--color-yattho-border-active); /* current/selected underline */ &::after { position: absolute; right: 50%; bottom: calc(50% - 25px); /* 48px total height / 2 (24px) + 1px */ width: 100%; height: 2px; content: ''; background: var(--color-yattho-border-active); border-radius: var(--yattho-borderRadius-medium, 6px); 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, 48px); } } .UnderlineNav-octicon { display: inline !important; margin-right: var(--yattho-control-medium-gap, 8px); color: var(--color-fg-muted); fill: var(--color-fg-muted); } .UnderlineNav-container { display: flex; justify-content: space-between; }