-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Set snackbar position to center #75294
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
67f5afb
8c64fff
8d2fe8f
d579207
48c3433
9dd5f66
a5d94d3
dd75987
e8a5a15
8e28362
d4663d9
fc40842
523bfc6
efccc32
1a09c35
1c697bd
d8f9d27
fe1a1f7
7ab8b01
c194476
bd6c422
78a00c4
21b0ae5
5c6e7ef
6c474ac
2300573
1c6bdbd
e2287f7
59555fc
ed07a88
b16fd7c
0a23d57
cccf367
f21e429
c43c38d
d803d41
098c5c1
9315875
b196106
f80f869
f81b353
7f3782d
c5e85d0
678d0c6
3db153a
632bbe7
7212a1d
6f7acf6
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -120,13 +120,6 @@ | |||||
| isolation: isolate; | ||||||
| } | ||||||
|
|
||||||
| // Adjust the position of the notices | ||||||
| .edit-post-layout__snackbar { | ||||||
|
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. It seems like there are no elements with this class anywhere, so if that's the case, we can remove this selector entirely. Perhaps this class was removed as part of the work to unify the editor packages.
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. This class is present in this file: gutenberg/packages/edit-post/src/components/layout/index.js Lines 624 to 625 in 7f3782d
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. The code should not be in the trunk branch. https://github.com/WordPress/gutenberg/blob/trunk/packages/edit-post/src/components/layout/index.js |
||||||
| position: fixed; | ||||||
| right: 0; | ||||||
| bottom: 24px; | ||||||
| padding-left: 24px; | ||||||
| padding-right: 24px; | ||||||
| @include snackbar-container(); | ||||||
| } | ||||||
|
|
||||||
| @include editor-left(".edit-post-layout .edit-post-layout__snackbar"); | ||||||
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.
After removing unnecessary selectors, we may only need to apply this mixin in one or two places. If that's the case, we can just hard-code the styles where needed without removing the mixin.
I also want to avoid exposing public mixins as much as possible.
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.
I may be misunderstanding, but the position of the SnackbarNotices component isn’t technically hardcoded. The consumer is responsible for defining the CSS container that determines where the snackbar appears. The mixin was introduced to avoid duplicating the same styling logic across multiple files.