Skip to content

Commit 0713704

Browse files
committed
fix(tabs): container type should be auto-width by default
Fixes #2739
1 parent 493567c commit 0713704

7 files changed

Lines changed: 25 additions & 6 deletions

File tree

css/_tabs.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,22 @@
102102
@include exports('tabs-container-disabled-hover') {
103103
@include tabs-container-disabled-hover;
104104
}
105+
106+
/// Container type: do not apply fixed 10rem width to nav links.
107+
/// Default tabs get width: 10rem at 42rem viewport from base Carbon styles
108+
/// (including :focus and :active); container tabs should size naturally.
109+
/// @access private
110+
/// @group components
111+
@mixin tabs-container-nav-link-width {
112+
@media (min-width: 42rem) {
113+
.#{$prefix}--tabs--container .#{$prefix}--tabs__nav-link,
114+
.#{$prefix}--tabs--container .#{$prefix}--tabs__nav-link:focus,
115+
.#{$prefix}--tabs--container .#{$prefix}--tabs__nav-link:active {
116+
width: auto;
117+
}
118+
}
119+
}
120+
121+
@include exports('tabs-container-nav-link-width') {
122+
@include tabs-container-nav-link-width;
123+
}

css/all.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/g10.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/g100.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/g80.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/g90.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/white.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)