-
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
Cleanup CSS variables #20529
Cleanup CSS variables #20529
Conversation
Size Change: -11 B (0%) Total Size: 866 kB
ℹ️ View Unchanged
|
@@ -1,11 +1,11 @@ | |||
.block-editor-color-gradient-control { | |||
&__color-indicator { | |||
margin-bottom: $grid-size; | |||
margin-bottom: $grid-unit; |
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 don't think we should ever actually use $grid-unit, it should always be one of the numbered ones. I.e. in this case, it should be $grid-unit-10.
In that vein, $grid-unit is intended only to seed all the numbered variables. Should it have a different name to reflect that?
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 updated but why not just remove the variable in that case and use $grid-unit-10 everywhere.
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.
Oh I guess that could work? Seems almost cyclical 😅
The alternative would be to spell out 8px for each variable.
@@ -48,7 +48,6 @@ | |||
|
|||
// Ensure that the height of the first appender, and the one between blocks, is the same as text. | |||
.block-editor-default-block-appender__content { | |||
min-height: $empty-paragraph-height / 2; |
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 haven't had time to test this yet, are you sure there aren't any negataive consequences of removing this? I'm sure we added it for a reason, back in the day.
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 reason we added it is to make sure the appender with or without paragraph has the same height. It's broken with or without this style now.
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.
Not sure I follow but I'll check when I have a moment.
In general this is a really nice bit of cleanup, thank you. I promise I'll get to the color variable cleanup as well, perhaps in my color PR. I left two comments to address. |
80cc8c1
to
30c78f7
Compare
Some cleaning to our CSS variables.