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

not an issue: CSS optimization #871

Closed
gn0st1c opened this issue May 18, 2018 · 6 comments
Closed

not an issue: CSS optimization #871

gn0st1c opened this issue May 18, 2018 · 6 comments

Comments

@gn0st1c
Copy link
Contributor

gn0st1c commented May 18, 2018

@xoseperez :
i thought you might want to see/test this.

i renamed pure css class names and saved about 4k.
just replaced "pure-" with "p-"

before: 65539 index.html.gz
after: 61060 index.html.gz

www.tar.gz

@xoseperez
Copy link
Owner

Amazing. Same concern as with #870 but it really pays off!

@xoseperez xoseperez added the enhancement New feature or request label May 19, 2018
@xoseperez xoseperez added this to the 1.12.7 milestone May 19, 2018
@gn0st1c
Copy link
Contributor Author

gn0st1c commented May 20, 2018

@xoseperez : that was also my concern but it's worth the trouble.

when you update the pure css files, just run; grep -rl 'pure-' . | xargs sed -i '' 's/pure-/p-/g'

@xoseperez
Copy link
Owner

@gn0st1c I have added a replace in the gulp file that should take care of replacing "pure-" with "p-" over the single merged file just before the gzipping.
But my numbers are not as spectacular. I just get about 1Kb reduction on the final gzipped file... where is the difference? I have pushed the code anyway.

@gn0st1c
Copy link
Contributor Author

gn0st1c commented May 21, 2018

@xoseperez : do not push the code.. because gulp will also replace file references but won't rename the files;

        <link rel="stylesheet" href="vendor/pure-1.0.0.min.css" />
        <link rel="stylesheet" href="vendor/pure-grids-responsive-1.0.0.min.css" />

@gn0st1c
Copy link
Contributor Author

gn0st1c commented May 21, 2018

your and my file size differences are because, i have more optimization locally. removing unnecessary html end tags, etc etc. i'll PR when i'm done :)

@xoseperez
Copy link
Owner

@gn0st1c I have pushed my code which does the replacing over the merged file, so the files in the html folder are not changed.

@xoseperez xoseperez modified the milestones: 1.12.7, 1.13.0 Jun 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants