-
Notifications
You must be signed in to change notification settings - Fork 0
CSS best practices #9
Copy link
Copy link
Open
Description
Apart from following the WordPress CSS coding standards, the CSS should also use some best practices. The first one that come into my mind (but there are a lot) are, for example:
1
Don't use element selectors if not strictly necessary. Things like
.settings-fields p.timezone-info
could be simply
.settings-fields .timezone-info
2
Don't use element selectors and also lower specificity as much as possible. Selectors like
.settings-fields .settings-field-control p
should be just
.settings-fields .description
More example welcome.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels