Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tabs): added default border to secondary, cleaned up modifiers #5171

Merged
merged 3 commits into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/patternfly/components/Tabs/examples/Tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ Whenever a list of tabs is unique on the current page, it can be used in a `<nav
| `.pf-c-tabs__toggle-text` | `<span>` | Initiates a tabs expandable toggle text. |
| `.pf-m-secondary` | `.pf-c-tabs` | Applies secondary styling to the tab component. |
| `.pf-m-no-border-bottom` | `.pf-c-tabs` | Removes bottom border from a tab component. |
| `.pf-m-border-bottom` | `.pf-c-tabs` | Adds a bottom border to secondary tabs. |
| `.pf-m-box` | `.pf-c-tabs` | Applies box styling to the tab component. |
| `.pf-m-vertical` | `.pf-c-tabs` | Applies vertical styling to the tab component. |
| `.pf-m-fill` | `.pf-c-tabs` | Modifies the tabs to fill the available space. |
Expand Down
2 changes: 1 addition & 1 deletion src/patternfly/components/Tabs/tabs.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{~#if tabs--IsExpandable}} pf-m-expandable{{/if}}
{{~#if tabs--IsNonExpandable}} pf-m-non-expandable{{/if}}
{{~#if tabs--IsExpanded}} pf-m-expanded{{/if}}
{{~#if tabs--HasBorderBottom}} pf-m-border-bottom{{/if}}
{{~#if tabs--HasNoBorderBottom}} pf-m-no-border-bottom{{/if}}
{{~#if __tabs-list--IsOverflow}} pf-m-overflow{{/if}}
{{~#if tabs--modifier}} {{tabs--modifier}}{{/if}}"
{{#if tabs--attribute}}
Expand Down
6 changes: 0 additions & 6 deletions src/patternfly/components/Tabs/tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -230,17 +230,11 @@ $pf-c-tabs--spacer-map: build-spacer-map("none", "sm", "md", "lg", "xl", "2xl");
}
}

&.pf-m-secondary,
&.pf-m-no-border-bottom {
--pf-c-tabs--before--BorderBottomWidth: 0;
--pf-c-tabs__link--disabled--before--BorderBottomWidth: 0;
}

&.pf-m-border-bottom {
--pf-c-tabs--before--BorderBottomWidth: var(--pf-c-tabs--before--border-width--base);
--pf-c-tabs__link--disabled--before--BorderBottomWidth: var(--pf-c-tabs--before--border-width--base);
}

// Remove bottom border for variants
&.pf-m-box,
&.pf-m-vertical {
Expand Down
6 changes: 3 additions & 3 deletions src/patternfly/demos/Tabs/examples/Tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ section: components
{{> tabs-template-pod-tab-list tabs-template-pod-tab-list--modifier="pf-m-page-insets"}}
{{/page-main-tabs}}
{{#> page-main-section page-main-section--IsLimitWidth="true" page-main-section--modifier="pf-m-light pf-m-no-padding"}}
{{> tabs-template-pod-tab-list tabs-template-pod-tab-list--IsSecondary="true" tabs-template-pod-tab-list--modifier="pf-m-page-insets pf-m-border-bottom" tabs--id=(concat tabs-template--id '-secondary') tabs-template-pod-tab-list--modifier=reset}}
{{> tabs-template-pod-tab-list tabs-template-pod-tab-list--IsSecondary="true" tabs-template-pod-tab-list--modifier="pf-m-page-insets" tabs--id=(concat tabs-template--id '-secondary') tabs-template-pod-tab-list--modifier=reset}}
{{#> tabs-template-pod-tab-content tab-content-body--modifier="pf-m-padding"}}
{{#> tabs-template-pod-tab-content tab-content-body--modifier=reset tabs--id=(concat tabs-template--id '-secondary') tabs-template-pod-tab-content--IsSecondary="true"}}
{{#> l-flex l-flex--modifier="pf-m-column"}}
Expand Down Expand Up @@ -385,7 +385,7 @@ section: components
{{#> modal-box-body modal-box-body--attribute=(concat 'id="' modal-template--id '-modal-description"')}}
{{#> grid grid--modifier="pf-m-gutter"}}
{{#> grid-item}}
{{#> tabs tabs--id=(concat modal-template--id '-tabs') tabs--modifier="pf-m-inset-none pf-m-secondary"}}
{{#> tabs tabs--id=(concat modal-template--id '-tabs') tabs--IsSecondary="true" tabs--modifier="pf-m-inset-none"}}
{{#> tabs-list}}
{{> __tabs-item
__tabs-item--current="true"
Expand Down Expand Up @@ -502,7 +502,7 @@ section: components
{{/title}}
{{/grid-item}}
{{#> grid-item}}
{{#> tabs tabs--id=(concat tabs-template--id '-subtabs') tabs--IsSecondary="true" tabs--HasBorderBottom="true" tabs--modifier="pf-m-inset-none"}}
{{#> tabs tabs--id=(concat tabs-template--id '-subtabs') tabs--IsSecondary="true" tabs--modifier="pf-m-inset-none"}}
{{#> tabs-list}}
{{> __tabs-item
__tabs-item--current="true"
Expand Down
2 changes: 1 addition & 1 deletion src/patternfly/demos/Tabs/tabs--page-grid-view.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{{#> wrapper newcontext tabs--page-grid-view--id=(concat tabs--page-grid-view--id "-subtabs")}}
{{#> l-flex l-flex--modifier="pf-m-column"}}
{{#> l-flex-item}}
{{#> tabs tabs--IsSecondary="true" tabs--HasBorderBottom="true" tabs--id=tabs--page-grid-view--id}}
{{#> tabs tabs--IsSecondary="true" tabs--id=tabs--page-grid-view--id}}
{{#> tabs-list}}
{{> __tabs-item
__tabs-item--current="true"
Expand Down