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

Built style sheets are duplicating a lot of information including comments. #1422

Closed
BE-Webdesign opened this issue Jun 24, 2017 · 2 comments
Labels
[Type] Enhancement A suggestion for improvement.

Comments

@BE-Webdesign
Copy link
Contributor

BE-Webdesign commented Jun 24, 2017

Our include path in webpack is being included multiple times over, which causes

/* Hugo's new WordPress shades of gray, from http://codepen.io/hugobaeta/pen/grJjVp */
/* Extra colors, some from https://make.wordpress.org/design/handbook/foundations/colors/ */
/* Other */
/* Editor */
/* Blocks */
/* Media Queries */
/* All media queries currently in WordPress:

min-width: 2000px
min-width: 1680px
min-width: 1250px
max-width: 1120px *
max-width: 1000px
min-width: 769px and max-width: 1000px
max-width: 960px *
max-width: 900px
max-width: 850px
min-width: 800px and max-width: 1499px
max-width: 800px
max-width: 799px
max-width: 782px *
max-width: 768px
max-width: 640px *
max-width: 600px *
max-width: 520px
max-width: 500px
max-width: 480px *
max-width: 400px *
max-width: 380px
max-width: 320px *

Those marked * seem to be more commonly used than the others.

Let's try and use as few of these as possible, and be mindful about adding new ones, so we don't make the situation worse

*/
/**
 * Long content fade mixin
 *
 * Creates a fading overlay to signify that the content is longer
 * than the space allows.
 */
/**
 * Editor Width mixin
 *
 * This mixin seeks to take the vinegar out of the responsive alignments in the editor.
 */
@-webkit-keyframes animate_fade {
  from {
    opacity: 0;
    -webkit-transform: translateY(4px);
            transform: translateY(4px); }
  to {
    opacity: 1;
    -webkit-transform: translateY(0px);
            transform: translateY(0px); } }
@keyframes animate_fade {
  from {
    opacity: 0;
    -webkit-transform: translateY(4px);
            transform: translateY(4px); }
  to {
    opacity: 1;
    -webkit-transform: translateY(0px);
            transform: translateY(0px); } }

@-webkit-keyframes move_background {
  from {
    background-position: 0 0; }
  to {
    background-position: 28px 0; } }

@keyframes move_background {
  from {
    background-position: 0 0; }
  to {
    background-position: 28px 0; } }

To be loaded for every rule. We could shrink our css files by A LOT, if we fix this. The commented part is stripped out on npm run build, but the animation styles are loaded over and over still.

@youknowriad
Copy link
Contributor

This has improved with #3804. I think we should just close this issue as we improved here.

It's not perfect but unless there's tree-shaking in Sass :) we can't fix this issue while keeping some generic mixins. Maybe we could move some of these styles to the WP common styles but we'll still need a generic mixin.

@BE-Webdesign
Copy link
Contributor Author

BE-Webdesign commented Dec 22, 2017

Closing see #3804.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants