-
Notifications
You must be signed in to change notification settings - Fork 210
feat(actionbar): new s2 migration #3657
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
19fe479
0e43d2d
9c2b19f
85881a0
dccf04a
df5bdf8
5bf1c46
3cd57fc
4bd9863
52f50ad
ba9179c
65ca55f
c4c8ae4
65a44d4
baa54f0
92aecd6
a7dafb2
744355d
af2a3b3
2222a6b
6b379e7
fe2ec7f
3ba1e64
2a1a635
1a5bbf7
5f6ce07
66d670d
34a5eea
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 |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| --- | ||
| "@spectrum-css/actionbar": major | ||
| --- | ||
|
|
||
| ### Actionbar S2 Migration | ||
|
|
||
| Action bar now has some updated colors, corner radius, and icons. There's a new look to the default and emphasized variants. | ||
|
|
||
| The emphasized has changed from an `accent` background color to a `neutral` background color. In light mode, the clear button and action buttons are `staticWhite` and in dark mode they are `staticBlack`. | ||
|
|
||
| #### New tokens | ||
|
|
||
| `--spectrum-actionbar-emphasized-actionbutton-label-color` | ||
| `--spectrum-actionbar-emphasized-icon-color` | ||
| `--spectrum-actionbar-minimum-width` | ||
| `--spectrum-actionbar-spacing-label-to-action-group` | ||
| `--spectrum-actionbar-spacing-action-group-edge` | ||
| `--spectrum-actionbar-close-button-to-counter` | ||
|
|
||
| #### New mods | ||
|
|
||
| `--mod-actionbar-minimum-width` | ||
| `--mod-actionbar-spacing-action-group-edge` | ||
| `--mod-actionbar-spacing-label-to-action-group` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,42 +12,36 @@ | |
| */ | ||
|
|
||
| .spectrum-ActionBar { | ||
| --spectrum-actionbar-popover-background-color: var(--spectrum-gray-25); | ||
| --spectrum-actionbar-popover-border-color: var(--spectrum-gray-400); | ||
|
|
||
| /* Layout */ | ||
| --spectrum-actionbar-height: var(--spectrum-action-bar-height); | ||
| --spectrum-actionbar-corner-radius: var(--spectrum-corner-radius-100); | ||
|
|
||
| /* item counter field label */ | ||
| --spectrum-actionbar-item-counter-font-size: var(--spectrum-font-size-100); | ||
| --spectrum-actionbar-minimum-width: var(--spectrum-action-bar-minimum-width); | ||
| --spectrum-actionbar-corner-radius: var(--spectrum-corner-radius-medium-size-extra-large); | ||
| --spectrum-actionbar-spacing-label-to-action-group: var(--spectrum-action-bar-label-to-action-group-area); | ||
| --spectrum-actionbar-spacing-padding-inline: var(--spectrum-action-bar-edge-to-content-area); | ||
| --spectrum-actionbar-spacing-top-area: var(--spectrum-action-bar-top-to-content-area); | ||
| --spectrum-actionbar-spacing-bottom-area: var(--spectrum-action-bar-bottom-to-content-area); | ||
| --spectrum-actionbar-close-button-to-counter: var(--spectrum-action-bar-close-button-to-counter); | ||
| /* stylelint-disable-next-line spectrum-tools/no-unused-custom-properties -- defines the field label mod */ | ||
| --spectrum-actionbar-item-counter-line-height: var(--spectrum-line-height-100); | ||
|
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.
Collaborator
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. @aramos-adobe I think this got flagged because we're only setting |
||
| --spectrum-actionbar-item-counter-color: var(--spectrum-neutral-content-color-default); | ||
|
|
||
| /* emphasized variation colors */ | ||
| --spectrum-actionbar-emphasized-background-color: var(--spectrum-informative-background-color-default); | ||
| --spectrum-actionbar-emphasized-item-counter-color: var(--spectrum-white); | ||
| /* colors - applied to popover */ | ||
| --spectrum-actionbar-popover-background-color: var(--spectrum-background-elevated-color); | ||
| --spectrum-actionbar-popover-border-color: var(--spectrum-action-bar-border-color); | ||
|
|
||
| /* spacing of action bar bottom and horizontal outer edge */ | ||
| --spectrum-actionbar-spacing-outer-edge: var(--spectrum-spacing-300); | ||
|
|
||
| /* spacing of close button */ | ||
| --spectrum-actionbar-spacing-close-button-top: var(--spectrum-spacing-100); | ||
| --spectrum-actionbar-spacing-close-button-start: var(--spectrum-spacing-100); | ||
| --spectrum-actionbar-spacing-close-button-end: var(--spectrum-spacing-75); | ||
|
|
||
| /* spacing of item counter field label */ | ||
| --spectrum-actionbar-spacing-item-counter-top: var(--spectrum-action-bar-top-to-item-counter); | ||
| --spectrum-actionbar-spacing-item-counter-end: var(--spectrum-spacing-400); | ||
|
|
||
| /* spacing of action group */ | ||
| --spectrum-actionbar-spacing-action-group-top: var(--spectrum-spacing-100); | ||
| --spectrum-actionbar-spacing-action-group-end: var(--spectrum-spacing-100); | ||
|
|
||
| /* drop shadow */ | ||
| --spectrum-actionbar-shadow-horizontal: var(--spectrum-drop-shadow-x); | ||
| --spectrum-actionbar-shadow-vertical: var(--spectrum-drop-shadow-y); | ||
| --spectrum-actionbar-shadow-blur: var(--spectrum-drop-shadow-blur); | ||
| --spectrum-actionbar-shadow-color: var(--spectrum-drop-shadow-color); | ||
| --spectrum-actionbar-shadow-horizontal: var(--spectrum-drop-shadow-elevated-x); | ||
| --spectrum-actionbar-shadow-vertical: var(--spectrum-drop-shadow-elevated-y); | ||
| --spectrum-actionbar-shadow-blur: var(--spectrum-drop-shadow-elevated-blur); | ||
| --spectrum-actionbar-shadow-color: var(--spectrum-drop-shadow-elevated-color); | ||
|
|
||
| &.spectrum-ActionBar--emphasized { | ||
| --spectrum-actionbar-item-counter-color: var(--spectrum-gray-25); | ||
| --spectrum-actionbar-popover-background-color: var(--spectrum-neutral-content-color-default); | ||
| } | ||
|
|
||
| /* cjk language support for item counter */ | ||
| &:lang(ja), | ||
|
|
@@ -57,17 +51,6 @@ | |
| } | ||
| } | ||
|
|
||
| /* windows high contrast mode */ | ||
| @media (forced-colors: active) { | ||
| .spectrum-ActionBar { | ||
| --highcontrast-actionbar-popover-border-color: CanvasText; | ||
| } | ||
|
|
||
| .spectrum-ActionBar--emphasized .spectrum-ActionBar-popover { | ||
| --highcontrast-actionbar-popover-border-color: CanvasText; | ||
| } | ||
| } | ||
|
|
||
| /* ActionBar is outer wrapper with nested popover component within */ | ||
| .spectrum-ActionBar { | ||
| /* creates horizontal spacing to edge */ | ||
|
|
@@ -94,11 +77,12 @@ | |
| .spectrum-ActionBar-popover { | ||
| /* popover is ActionBar height */ | ||
| block-size: var(--mod-actionbar-height, var(--spectrum-actionbar-height)); | ||
| min-inline-size: var(--mod-actionbar-minimum-width, var(--spectrum-actionbar-minimum-width)); | ||
| box-sizing: border-box; | ||
| inline-size: 100%; | ||
| margin: auto; | ||
| padding-block-start: 0; | ||
| padding-block-end: 0; | ||
| padding-inline: var(--mod-actionbar-spacing-action-group-edge, var(--spectrum-actionbar-spacing-padding-inline)); | ||
| padding-block: var(--mod-actionbar-spacing-top-area, var(--spectrum-actionbar-spacing-top-area)) var(--mod-actionbar-spacing-bottom-area, var(--spectrum-actionbar-spacing-bottom-area)); | ||
|
|
||
| /* Be relative so our width can be restricted */ | ||
| position: relative; | ||
|
|
@@ -115,27 +99,15 @@ | |
| /* inner layout of content items */ | ||
| display: flex; | ||
| flex-direction: row; | ||
| } | ||
|
|
||
| /* close button */ | ||
| .spectrum-CloseButton { | ||
| margin-inline-start: var(--mod-actionbar-spacing-close-button-start, var(--spectrum-actionbar-spacing-close-button-start)); | ||
| margin-inline-end: var(--mod-actionbar-spacing-close-button-end, var(--spectrum-actionbar-spacing-close-button-end)); | ||
| margin-block-start: var(--mod-actionbar-spacing-close-button-top, var(--spectrum-actionbar-spacing-close-button-top)); | ||
| flex-shrink: 0; | ||
| align-items: center; | ||
| } | ||
|
|
||
| /* item counter */ | ||
| .spectrum-FieldLabel { | ||
| margin-inline-end: var(--mod-actionbar-spacing-item-counter-end, var(--spectrum-actionbar-spacing-item-counter-end)); | ||
| margin-block-start: var(--mod-actionbar-spacing-item-counter-top, var(--spectrum-actionbar-spacing-item-counter-top)); | ||
|
|
||
| /* neutralize padding for correct spacing within ActionBar */ | ||
| padding: 0; | ||
|
|
||
| font-size: var(--mod-actionbar-item-counter-font-size, var(--spectrum-actionbar-item-counter-font-size)); | ||
| --mod-fieldlabel-font-size: var(--spectrum-action-bar-counter-font-size); | ||
| --mod-fieldlabel-line-height: var(--spectrum-actionbar-item-counter-line-height); | ||
| color: var(--mod-actionbar-item-counter-color, var(--spectrum-actionbar-item-counter-color)); | ||
| line-height: var(--mod-actionbar-item-counter-line-height, var(--spectrum-actionbar-item-counter-line-height)); | ||
| padding-inline-start: var(--mod-actionbar-close-button-to-counter, var(--spectrum-actionbar-close-button-to-counter)); | ||
|
|
||
| /* cjk language support */ | ||
| &:lang(ja), | ||
|
|
@@ -147,26 +119,9 @@ | |
|
|
||
| /* action group */ | ||
| .spectrum-ActionGroup { | ||
| margin-inline-end: var(--mod-actionbar-spacing-action-group-end, var(--spectrum-actionbar-spacing-action-group-end)); | ||
| margin-block-start: var(--mod-actionbar-spacing-action-group-top, var(--spectrum-actionbar-spacing-action-group-top)); | ||
|
|
||
| /* align to end by default */ | ||
| margin-inline-start: auto; | ||
| } | ||
| } | ||
|
|
||
| .spectrum-ActionBar--emphasized { | ||
| .spectrum-ActionBar-popover { | ||
| filter: none; | ||
| background-color: var(--mod-actionbar-emphasized-background-color, var(--spectrum-actionbar-emphasized-background-color)); | ||
|
|
||
| /* border transparent instead of none so WHCM will have visible border */ | ||
| border-color: transparent; | ||
| } | ||
|
|
||
| /* ensure text is legible on emphasized background */ | ||
| .spectrum-FieldLabel { | ||
| color: var(--mod-actionbar-emphasized-item-counter-color, var(--spectrum-actionbar-emphasized-item-counter-color)); | ||
| padding-inline-start: var(--mod-actionbar-spacing-label-to-action-group, var(--spectrum-actionbar-spacing-label-to-action-group)); /* space between label and action group */ | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -184,3 +139,10 @@ | |
| .spectrum-ActionBar--flexible .spectrum-ActionBar-popover { | ||
| inline-size: auto; | ||
| } | ||
|
|
||
| /* windows high contrast mode */ | ||
| @media (forced-colors: active) { | ||
| .spectrum-ActionBar { | ||
| --highcontrast-actionbar-popover-border-color: CanvasText; | ||
| } | ||
| } | ||
|
Collaborator
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. @aramos-adobe Could we add
Collaborator
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. We could also add to the
Collaborator
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. @aramos-adobe Thanks so much for adding the migrated status! Once your branch is rebased, we should get a migrated badge now :)
If you could also add |

Uh oh!
There was an error while loading. Please reload this page.