Skip to content

Commit 9785534

Browse files
committed
fix(docs-infra): prevent tab labels from being clipped
The active docs tab applied a 2px bottom border that inactive tabs lacked, which shrank the active label's content box and clipped its descenders. It also set `line-height: 1.5` only on the active label, so switching tabs nudged the text. Reserve the border as transparent on every tab and recolor it on the active one, and share the label `line-height`, so the letters are no longer cut and the label stays put when switching.
1 parent b126dc9 commit 9785534

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

adev/shared-docs/styles/_resets.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,16 +310,15 @@
310310

311311
.mdc-tab {
312312
padding-inline: 15px !important;
313+
border-block-end: 2px solid transparent;
313314
}
314315

315316
.mdc-tab__text-label {
316317
transition: none;
318+
line-height: 1.5;
317319
}
318320

319321
.mdc-tab--active {
320-
border: 0;
321-
border-block-end-width: 2px;
322-
border-style: solid;
323322
border-image: var(--purple-to-blue-horizontal-gradient) 1;
324323

325324
.mdc-tab__text-label {

0 commit comments

Comments
 (0)