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

Remove duplicated styling in main.css #40725

Merged
merged 1 commit into from
Mar 23, 2017
Merged

Remove duplicated styling in main.css #40725

merged 1 commit into from
Mar 23, 2017

Conversation

Cldfire
Copy link
Contributor

@Cldfire Cldfire commented Mar 22, 2017

If nothing else, it saves a bit of data.

@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS.

cc @GuillaumeGomez

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@estebank
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 22, 2017

📌 Commit e2b5a8c has been approved by estebank

@GuillaumeGomez
Copy link
Member

@bors: r-

.current wasn't a duplicate, only the following block should have been removed:

.sidebar {
    background-color: #F1F1F1;
}

@Cldfire
Copy link
Contributor Author

Cldfire commented Mar 22, 2017

Oh.... are you sure?

The file currently looks like this:

.sidebar {
	background-color: #F1F1F1;
}

.sidebar .current {
	background-color: #fff;
}

.sidebar {
    background-color: #F1F1F1;
}

.sidebar .current {
    background-color: #fff;
}

All I've done is remove the bottom two, which seem to be exact, letter-for-letter duplicates of the upper two.

Also, if you look at an element with the .sidebar .current class in devtools, you'll see that the style is being applied twice:

spectacle lh5161

If I'm tragically misunderstanding something about CSS here, I'd love to learn from this and correct my knowledge :)

@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Mar 22, 2017

Oh damn, you're absolutely right! I stupidly looked at your file instead of the current one... My mistake. Just one thing to change though:

.sidebar {
    background-color: #F1F1F1;
}

.sidebar .current {
    background-color: #fff;
}

The .sidebar is useless since the background-color is redefined just below. So we should just keep:

.sidebar .current {
    background-color: #fff;
}

Could you update it this way in addition of your removal please?

@Cldfire
Copy link
Contributor Author

Cldfire commented Mar 22, 2017

So you want the .sidebar style class removed completely?

Sorry to double-guess you again, but doing that would mean that the only place the sidebar class would have to get a background-color from would be the body styling, which reverts the grey sidebar color change that was made recently...

spectacle lh6749

As you can see in the above screenshot of devtools for https://doc.rust-lang.org/nightly/std/.

Toggling off both .sidebar background color changes....

spectacle hf6749

...now gives the sidebar body's background-color, which is white.

spectacle qq6749

@GuillaumeGomez
Copy link
Member

And you're absolutely right, thought it had a comma... Sorry for the loss of time.

@bors: r=estebank rollup

@bors
Copy link
Contributor

bors commented Mar 22, 2017

📌 Commit e2b5a8c has been approved by estebank

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Mar 22, 2017
Remove duplicated styling in main.css

If nothing else, it saves a bit of data.
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 22, 2017
Remove duplicated styling in main.css

If nothing else, it saves a bit of data.
bors added a commit that referenced this pull request Mar 22, 2017
Rollup of 13 pull requests

- Successful merges: #40509, #40523, #40548, #40578, #40619, #40689, #40690, #40692, #40704, #40722, #40723, #40725, #40732
- Failed merges:
@bors bors merged commit e2b5a8c into rust-lang:master Mar 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants