-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
doc: CSS tweaks #29669
doc: CSS tweaks #29669
Conversation
* split selectors to one per line * remove units from 0 * use double colon pseudo selectors consistently * use `background-color` instead of the `background` shorthand since only the color is supposed to change * remove leading zeros from numbers * remove redundant values from shorthands * use lowercase hex for colors * use numeric values for `font-weight`
@@ -151,39 +164,40 @@ ol.version-picker li:last-child a { | |||
} | |||
|
|||
.api_stability { | |||
color: white !important; | |||
margin: 0 0 1rem 0; | |||
font-family: "Lato", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, Tahoma, sans-serif; |
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 isn't needed because it's inherited by the body
font-family.
@nodejs/collaborators This could use some reviews from some web/CSS-savvy folks. |
As a not-so-web-developer lately, how much of this is taste, and how much is objectively better? I'm just asking because I don't think we should accept PRs that flip code style based on personal taste alone, unless it's been discussed. |
Just to clarify, the only style change is splitting the selectors to one per line. Which is similar to using one var in JS. I personally find this much easier to read. Note that these changes aim to make the CSS consistent first, and following the best practices nowadays. |
This seems to be just applying consistent patterns across our css files . It would be great, what patterns do people from https://github.com/nodejs/nodejs.dev follow. Since we use handful of css over there in nodejs.dev, making the patterns / css practice consistent across repo will be really helpful. |
Note that I have already switched the current website to Sass and also added Stylelint, which means we can probably just create a stylelint config later for use in most nodejs projects. |
Landed in cdf8f70 |
* split selectors to one per line * remove units from 0 * use double colon pseudo selectors consistently * use `background-color` instead of the `background` shorthand since only the color is supposed to change * remove leading zeros from numbers * remove redundant values from shorthands * use lowercase hex for colors * use numeric values for `font-weight` PR-URL: #29669 Reviewed-By: Benjamin Gruenbaum <[email protected]>
* split selectors to one per line * remove units from 0 * use double colon pseudo selectors consistently * use `background-color` instead of the `background` shorthand since only the color is supposed to change * remove leading zeros from numbers * remove redundant values from shorthands * use lowercase hex for colors * use numeric values for `font-weight` PR-URL: #29669 Reviewed-By: Benjamin Gruenbaum <[email protected]>
background-color
instead of thebackground
shorthand since only the color is supposed to changefont-weight
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes