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 overly specific css from main.css in site_template #1574

Merged
merged 1 commit into from Sep 23, 2013

Conversation

Projects
None yet
4 participants
@edwardball
Contributor

edwardball commented Sep 23, 2013

I noticed the main.css file includes some overly specific CSS selectors. For example, since the whole page is wrapped in a div with a class of site there is no need to prefix any of the selectors .site (apart from the .site selector itself). And in general, there is very rarely a compelling reason to qualify a selector with a tag name i.e. it's better to write .posts instead of ul.posts.

More info about CSS efficiency can be found over at CSS Wizardry: http://csswizardry.com/2012/07/quasi-qualified-css-selectors/

@mattr-

This comment has been minimized.

Member

mattr- commented Sep 23, 2013

A comparison screenshot that shows no change to the rendering of the
site template would be nice to have. Would you mind doing that for us?

On Mon, Sep 23, 2013 at 7:46 AM, Aptary notifications@github.com wrote:

I noticed the main.css file includes some overly specific CSS selectors. For
example, since the whole page is wrapped in a div with a class of site there
is no need to prefix any of the selectors .site (apart from the .site
selector itself). And in general, there is very rarely a compelling reason
to qualify a selector with a tag name i.e. it's better to write .posts
instead of ul.posts.

More info about CSS efficiency can be found over at CSS Wizardry:
http://csswizardry.com/2012/07/quasi-qualified-css-selectors/


You can merge this Pull Request by running

git pull https://github.com/Aptary/jekyll simplified_css

Or view, comment on, or merge it at:

#1574

Commit Summary

Remove overly specific css from site template

File Changes

M lib/site_template/css/main.css (30)

Patch Links:

https://github.com/mojombo/jekyll/pull/1574.patch
https://github.com/mojombo/jekyll/pull/1574.diff

@edwardball

This comment has been minimized.

Contributor

edwardball commented Sep 23, 2013

Certainly, not a problem. Here's the home page and post page rendered with the old CSS. I've overlaid a 50% transparent screenshot on top of each with the new CSS, and as you can see, in both cases, old and new are absolutely identical :)

jekyll-home-comparison
jekyll-post-comparison

@mattr-

This comment has been minimized.

Member

mattr- commented Sep 23, 2013

Thanks! ❤️ You rock! 🤘

mattr- added a commit that referenced this pull request Sep 23, 2013

Merge pull request #1574 from Aptary/simplified_css
Remove overly specific css from main.css in site_template

@mattr- mattr- merged commit d3cddc7 into jekyll:master Sep 23, 2013

1 check passed

default The Travis CI build passed
Details

mattr- added a commit that referenced this pull request Sep 23, 2013

@edwardball edwardball deleted the edwardball:simplified_css branch Sep 23, 2013

@robwierzbowski

This comment has been minimized.

Contributor

robwierzbowski commented Nov 29, 2013

Thanks, @Aptary.

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.