doc: CSS tweaks#29669
doc: CSS tweaks#29669XhmikosR wants to merge 1 commit intonodejs:masterfrom XhmikosR:master-xmr-docs-css
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`
| .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.
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 <benjamingr@gmail.com>
* 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 <benjamingr@gmail.com>
background-colorinstead of thebackgroundshorthand since only the color is supposed to changefont-weightChecklist
make -j4 test(UNIX), orvcbuild test(Windows) passes