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

fix(site): deduplicate styles for the site #2011

Merged
merged 2 commits into from Feb 28, 2017

Conversation

Projects
None yet
3 participants
@Haroenv
Copy link
Member

Haroenv commented Feb 27, 2017

What project are you opening a pull request for?

  • react-instantsearch (use v2 base)

Summary

there were two css files linked, but they only differed in the components/header file, so they could be reused into one

pay attention to doocgen/layouts/example where I replaced header.css to index.css, but it doesn't make a big difference in the size, since index.css should already be cached at this point, and is requested on every other page.

cc @LukyVj

Result

css is not longer duplicated, /example/* loads the whole css

fix(site): deduplicate styles for the site
there were two css files linked, but they only differed in the `components/header` file, so they could be reused into one

pay attention to doocgen/layouts/example where I replaced header.css to index.css, but it doesn't make a big difference in the size, since index.css should already be cached at this point, and is requested on every other page.

cc @LukyVj
@Haroenv

This comment has been minimized.

Copy link
Member Author

Haroenv commented Feb 27, 2017

don't merge, this breaks the examples

@mthuret

This comment has been minimized.

Copy link
Member

mthuret commented Feb 27, 2017

I don't know if it's related to this, but some time ago I fixed the css collision we had with our examples by only using header.css inside them.

@Haroenv

This comment has been minimized.

Copy link
Member Author

Haroenv commented Feb 27, 2017

fixed by doing what you suggested in 78e2d03

@vvo

vvo approved these changes Feb 28, 2017

Copy link
Member

vvo left a comment

LGTM 🙆

@vvo vvo merged commit de9e190 into v2 Feb 28, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details

@vvo vvo deleted the fix/dedupe-css branch Feb 28, 2017

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