-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Shadow Panel: Add reset button #68981
base: trunk
Are you sure you want to change the base?
Changes from all commits
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,7 +1,3 @@ | ||||||||||||||
.block-editor-global-styles__toggle-icon { | ||||||||||||||
fill: currentColor; | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
// @todo Ideally, popover, swatch size, and gap values should be CSS variables | ||||||||||||||
// to apply precise grid layouts. | ||||||||||||||
// https://github.com/WordPress/gutenberg/blob/954ecae571abbddc113d3a4bd8e1a72230180554/packages/block-editor/src/components/duotone-control/style.scss#L3-L9 | ||||||||||||||
|
@@ -24,6 +20,7 @@ | |||||||||||||
.block-editor-global-styles__shadow-dropdown { | ||||||||||||||
display: block; | ||||||||||||||
padding: 0; | ||||||||||||||
position: relative; | ||||||||||||||
|
||||||||||||||
button { | ||||||||||||||
width: 100%; | ||||||||||||||
|
@@ -35,6 +32,33 @@ | |||||||||||||
} | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
.block-editor-global-styles__shadow-dropdown { | ||||||||||||||
> .components-button.has-icon.has-text:first-child { | ||||||||||||||
gap: $grid-unit-10; | ||||||||||||||
} | ||||||||||||||
} | ||||||||||||||
Comment on lines
+36
to
+38
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. CSS selectors with the |
||||||||||||||
|
||||||||||||||
.block-editor-global-styles__shadow-editor__remove-button { | ||||||||||||||
position: absolute; | ||||||||||||||
right: 0; | ||||||||||||||
top: $grid-unit; | ||||||||||||||
margin: auto $grid-unit auto; | ||||||||||||||
opacity: 0; | ||||||||||||||
transition: opacity 0.1s ease-in-out; | ||||||||||||||
@include reduce-motion("transition"); | ||||||||||||||
|
||||||||||||||
Comment on lines
+47
to
+48
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.
Suggested change
See #68282 |
||||||||||||||
.block-editor-global-styles__shadow-dropdown:hover &, | ||||||||||||||
&:focus, | ||||||||||||||
&:hover { | ||||||||||||||
opacity: 1; | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
@media (hover: none) { | ||||||||||||||
// Show reset button on devices that do not support hover. | ||||||||||||||
opacity: 1; | ||||||||||||||
} | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
// These styles are similar to the color palette. | ||||||||||||||
.block-editor-global-styles__shadow-indicator { | ||||||||||||||
appearance: none; | ||||||||||||||
|
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.
Keep wording consistent with other similar UI.