/* 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; } .UnderlineNav .Counter { margin-left: var(--yattho-control-medium-gap, 8px); color: var(--color-fg-default); background-color: var(--color-neutral-muted); } .UnderlineNav .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; } .UnderlineNav-item:hover, .UnderlineNav-item:focus, .UnderlineNav-item: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 */ .UnderlineNav-item [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 */ .UnderlineNav-item::before { position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; min-height: 48px; content: ""; transform: translateX(-50%) translateY(-50%); } /* hover state was "sticking" on mobile after click */ @media (pointer: fine) { .UnderlineNav-item:hover { color: var(--color-fg-default); text-decoration: none; background: var(--color-action-list-item-default-hover-bg); transition: background 0.12s ease-out; } } .UnderlineNav-item.selected, .UnderlineNav-item[role='tab'][aria-selected='true'], .UnderlineNav-item[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 */ } .UnderlineNav-item.selected::after, .UnderlineNav-item[role='tab'][aria-selected='true']::after, .UnderlineNav-item[aria-current]:not([aria-current='false'])::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--right .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--full .UnderlineNav-body { min-height: var(--base-size-48, 48px); } .UnderlineNav-octicon { display: inline !important; } .UnderlineNav-octicon { 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; }