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

Update normalize.css to v2.1.2 and minify #1430

Merged
merged 3 commits into from Aug 23, 2013

Conversation

Projects
None yet
4 participants
@doktorbro
Member

doktorbro commented Aug 18, 2013

Normalize.css is a blocking stylesheet, it must load as fast as possible.

@doktorbro

This comment has been minimized.

Member

doktorbro commented Aug 18, 2013

The shell for that process was

curl "http://necolas.github.io/normalize.css/2.1.2/normalize.css" -o "normalize.scss"
sass "normalize.scss":"normalize.css" --style compressed
@mattr-

This comment has been minimized.

Member

mattr- commented Aug 18, 2013

  • How far behind were we before?
  • What advantages do we gain from pulling in this new version?
  • Can you automate this with a rake task or some other such thing to make this repeatable by anybody in the future?
@doktorbro

This comment has been minimized.

Member

doktorbro commented Aug 18, 2013

How far behind were we before?

The old version is from 2012-03-11.

What advantages do we gain from pulling in this new version?

Normalize is a living library, it catches differences browsers have now. The minification reduces the gz-compressed file size from 2.9 KB to 0.9 KB.

Can you automate this with a rake task or some other such thing to make this repeatable by anybody in the future?

I don’t know how to write rake tasks. A bash task looks like this:

curl "http://necolas.github.io/normalize.css/latest/normalize.css" -o "normalize.scss"
sass "normalize.scss":"normalize.css" --style compressed

@necolas, any advices?

@parkr

This comment has been minimized.

Member

parkr commented Aug 18, 2013

I'm OK with this as long as it doesn't cause any horrible disruptions in the visuals on the site.

Rake task is very simple. It's Ruby's version of Make, which you've probably used before. It has a special function called sh which takes one argument: a command. So it would look like this:

namespace :site do
  task :update_normalize_css do
    Dir.chdir("site/css") do
      sh 'curl "http://necolas.github.io/normalize.css/latest/normalize.css" -o "normalize.scss"'
      sh 'sass "normalize.scss":"normalize.css" --style compressed'
    end
  end
end
@parkr

This comment has been minimized.

Member

parkr commented Aug 23, 2013

LGTM. @mattr-?

@mattr-

This comment has been minimized.

Member

mattr- commented Aug 23, 2013

👍 :shipit:

parkr added a commit that referenced this pull request Aug 23, 2013

Merge pull request #1430 from penibelst/site-speed
Update normalize.css to v2.1.2 and minify

@parkr parkr merged commit 319a09a into jekyll:master Aug 23, 2013

1 check passed

default The Travis CI build passed
Details

parkr added a commit that referenced this pull request Aug 23, 2013

@doktorbro doktorbro deleted the doktorbro:site-speed branch Aug 23, 2013

@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.