Skip to content

Commit

Permalink
chore(tabs): added default border to secondary, cleaned up modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
jenny-s51 committed Oct 13, 2022
1 parent 4e3505c commit f060ea9
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 11 deletions.
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
4 changes: 2 additions & 2 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 @@ -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

0 comments on commit f060ea9

Please sign in to comment.