-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Remove duplicate SCSS rules, merge (consecutive) identical selectors. #14520
Remove duplicate SCSS rules, merge (consecutive) identical selectors. #14520
Conversation
@@ -1,5 +1,4 @@ | |||
.editor-error-boundary { | |||
max-width: $content-width; |
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.
Please advise as to which max-width
to keep. Currently preserving existing behavior, $content-width
appears to be too narrow for this element (cf. #8834)
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.
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.
This is a great code quality improvement 👍
Out of curiosity, did you use some automated tool to identify these redundant styles? It would be nice if we could find a way to integrate this into existing build tooling to avoid similar future issues.
@@ -1,5 +1,4 @@ | |||
.editor-error-boundary { | |||
max-width: $content-width; |
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.
@@ -1,12 +1,10 @@ | |||
.wp-block-media-text { | |||
display: grid; | |||
} |
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.
It appears this one was resolved separately in #13989, causing the merge conflict. I'll plan to resolve it.
Description
This PR removes a couple of duplicate CSS rules and merges consecutive selectors in the same file, in cases where the rules have (probably) not been separated on purpose, to improve readability and understandability, as well as slightly reducing the filesize.
How has this been tested?
This change has no side effects.
Types of changes
Refactor, non-breaking