-
Notifications
You must be signed in to change notification settings - Fork 14
fix(vertical tabs): update with unified tokens #99
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
Changes from all commits
05db76c
2199e5b
ccde457
8c1cc83
1021b3f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| // Extensions StyleSheets | ||
| @import './react-catalog-view-extension/react-catalog-view-extension'; | ||
| @use './react-catalog-view-extension/react-catalog-view-extension' as *; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| /** | ||
| Patternfly React Extensions Partials | ||
| */ | ||
| @import 'variables'; | ||
| @import 'catalog-item'; | ||
| @import 'catalog-tile'; | ||
| @import 'vertical-tabs'; | ||
| @import 'properties-side-panel'; | ||
| @import 'filter-side-panel'; | ||
| @use 'variables' as *; | ||
| @use 'catalog-item' as *; | ||
| @use 'catalog-tile' as *; | ||
| @use 'vertical-tabs' as *; | ||
| @use 'properties-side-panel' as *; | ||
| @use 'filter-side-panel' as *; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,15 +18,30 @@ | |
| margin-inline-start: var(--pf-t--global--spacer--md); | ||
| } | ||
|
|
||
| &::before { | ||
| background: var(--pf-t--global--color--brand--accent--default); | ||
| border-radius: var(--pf-t--global--border--radius--pill); | ||
| content: "\00a0"; // | ||
| inset-inline-start: 0; | ||
| inset-block-start: var(--pf-t--global--spacer--xs); | ||
| position: absolute; | ||
| width: var(--pf-t--global--border--width--extra-strong); | ||
| pointer-events: none; | ||
| transition-timing-function: var(--pf-t--global--motion--timing-function--decelerate); | ||
| transition-duration: 0ms; | ||
| transition-property: scale; | ||
| scale: 1 0; | ||
| } | ||
|
|
||
| > a { | ||
| color: var( --pf-t--global--text--color--regular); | ||
| color: var( --pf-t--global--text--color--subtle); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just want to make sure this was confirmed in design? It matches figma, but wasn't called out as a change to make. Also figma uses the default text color for the active/selected tab state, so if we would want to confirm that if we make this change, too.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got more info from Design on this and updated for default to be subtle and hover/active to be default. |
||
| text-decoration: none; | ||
| display: block; | ||
| margin-inline-start: var(--pf-t--global--spacer--md); | ||
| margin-inline-start: calc(var(--pf-t--global--spacer--md) - var(--pf-t--global--border--width--extra-strong)); | ||
| padding: var(--pf-t--global--spacer--xs) var(--pf-t--global--spacer--sm) var(--pf-t--global--spacer--xs) var(--pf-t--global--spacer--sm); | ||
| vertical-align: top; | ||
| word-break: break-word; | ||
| border-radius: var(--pf-t--global--border--radius--small); | ||
| border-radius: var(--pf-t--global--border--radius--action--plain--default); | ||
| position: relative; | ||
|
|
||
| &::after { | ||
|
|
@@ -40,6 +55,7 @@ | |
|
|
||
| &:hover, | ||
| &:focus { | ||
| color: var( --pf-t--global--text--color--regular); | ||
| background-color: var(--pf-t--global--background--color--action--plain--hover); | ||
| text-decoration: none; | ||
|
|
||
|
|
@@ -62,13 +78,13 @@ | |
| } | ||
|
|
||
| &.active { | ||
| > a { | ||
| color: var( --pf-t--global--text--color--regular); | ||
| } | ||
|
|
||
| &::before { | ||
| background: var( --pf-t--global--border--color--brand--clicked); | ||
| content: "\00a0"; // | ||
| inset-inline-start: 0; | ||
| inset-block-start: var(--pf-t--global--spacer--xs); | ||
| position: absolute; | ||
| width: var(--pf-t--global--border--width--extra-strong); | ||
| transition-duration: var(--pf-t--global--motion--duration--fade--default); | ||
| scale: 1 1; | ||
| } | ||
| } | ||
|
|
||
|
|
||
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the figma file, the gap between the accent color and the nav item is smaller than it appears in the preview. I think this is supposed to be a small spacer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andrew-ronaldson, I can see the difference Nicole is pointing out but could you clarify? In the dev notes I'm seeing a calc(spacer-md - 3px) (3px currently = --pf-t--global--border--width--extra-strong) between the indicator and where the padding starts for the a tag. Then the padding around the text for the a tag is set to top/bottom spacer-xs and left/right spacer md.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way you have the spacing aligns with the visual presentation of vertical Tabs component just implemented differently. Dropping down to a small makes a 5px gap and that feels too narrow. We could change the accent to be outset of the container but then it has a negative margin and messes with left alignment. I think this is fine as you have it and we can tinker more as needed.