Skip to content
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

Closed
wants to merge 1 commit into from
Closed

doc: CSS tweaks #29669

wants to merge 1 commit into from

Conversation

XhmikosR
Copy link
Contributor

  • 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
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Sep 23, 2019
* 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`
@XhmikosR XhmikosR changed the title doc/api_assets/style.css: CSS tweaks doc: CSS tweaks Sep 23, 2019
@@ -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;
Copy link
Contributor Author

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.

@Trott
Copy link
Member

Trott commented Oct 1, 2019

@nodejs/collaborators This could use some reviews from some web/CSS-savvy folks.

@Trott
Copy link
Member

Trott commented Oct 1, 2019

@ronkorving
Copy link
Contributor

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.

@XhmikosR
Copy link
Contributor Author

XhmikosR commented Oct 1, 2019

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.

@antsmartian
Copy link
Contributor

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.

@XhmikosR
Copy link
Contributor Author

XhmikosR commented Oct 1, 2019

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.

@Trott
Copy link
Member

Trott commented Oct 4, 2019

Landed in cdf8f70

@Trott Trott closed this Oct 4, 2019
Trott pushed a commit that referenced this pull request Oct 4, 2019
* 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]>
@XhmikosR XhmikosR deleted the master-xmr-docs-css branch October 4, 2019 05:22
BridgeAR pushed a commit that referenced this pull request Oct 9, 2019
* 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]>
@BridgeAR BridgeAR mentioned this pull request Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants