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

Optimize CSS Assets safe = true #1901

Merged
merged 1 commit into from
Jun 6, 2017
Merged

Optimize CSS Assets safe = true #1901

merged 1 commit into from
Jun 6, 2017

Conversation

JulienMelissas
Copy link
Contributor

I was running into some issues on production builds with z-indexes as well as a few more advanced background gradients, etc. This issue linked to a solution I thought I should try which fixed it right away. By default I think this should be included in all builds.

I was running into some issues on production builds with z-indexes as well as a few more advanced background gradients, etc. [This issue](vuejs-templates/webpack#614) linked to a solution I thought I should try which fixed it right away. By default I think this should be included in all builds.
@swalkinshaw
Copy link
Member

Would be nice to see an example and the size difference.

@oxyc
Copy link
Contributor

oxyc commented Jun 6, 2017

I've had the issue with Foundation back in Sage 8 as well. Same fix.

@JulienMelissas
Copy link
Contributor Author

JulienMelissas commented Jun 6, 2017

Would be nice to see an example and the size difference.

So I have 2 css files in my build, main.css and critical.css
Here's with this PR:

main: 121kb
critical: 13kb

And before:

main: 120kb
critical: 13kb

This is a production project with 99% of the code written. Not much of a difference iirc 😉

@JulienMelissas
Copy link
Contributor Author

Oops, sorry you also said an example. On this one project in critical.css I have a z-index set to 2000 for an object that needs to be on top of EVERYTHING on the page at the beginning of the page load (in this example it's an 21+ screen for a brewery). With safe off, it transforms the z-index to 3. It also takes the background gradient animation and totally screws it up. Not exactly sure what it's doing there but I know it doesn't work. Probably a keyframe optimization thing.

@oxyc
Copy link
Contributor

oxyc commented Jun 6, 2017

Related #1610 (comment)

@JulienMelissas
Copy link
Contributor Author

@oxyc oh word! looks like this just didn't get ported over in the new Sage.

@QWp6t QWp6t merged commit c304c30 into master Jun 6, 2017
@QWp6t QWp6t deleted the optimize-css-safe branch June 6, 2017 20:15
ptrckvzn pushed a commit to ptrckvzn/sage that referenced this pull request Jul 11, 2017
* upstream/master:
  Controller examples
  Change syntax of template call to match other files in views/
  Remove test output.
  Don't remove comments when clearing files.
  Use latest Controller (soberwp/controller#26)
  assets -> resources/assets
  Update operator for template call
  Remove post format reference in template call
  Update comments, add some more
  Add soberwp/controller
  Optimize CSS Assets safe = true (roots#1901)
  update inline documentation to reflect correct theme file locations
  Fix stylelint errors.
  Add Stylelint linting for scss files.
  Use official SASS transpiled partials instead
  Add Tachyons PR link
  Update CHANGELOG.md
  Add Tachyons as CSS framework option
  Add Tachyons as a CSS framework option

# Conflicts:
#	resources/assets/styles/common/_global.scss
#	resources/assets/styles/common/_variables.scss
#	resources/assets/styles/components/_comments.scss
#	resources/assets/styles/components/_forms.scss
#	resources/assets/styles/components/_wp-classes.scss
#	resources/assets/styles/layouts/_header.scss
#	resources/assets/styles/main.scss
#	yarn.lock
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.

4 participants