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

Shorthand syntax has the potential to introduce **breakage** #8

Open
thierryk opened this issue Jun 9, 2016 · 0 comments
Open

Shorthand syntax has the potential to introduce **breakage** #8

thierryk opened this issue Jun 9, 2016 · 0 comments

Comments

@thierryk
Copy link

thierryk commented Jun 9, 2016

Let's imagine this scenario:

HTML

<div class="module news">
   ...
</div>

CSS

.module {
    background-color: #fff;
}
.news {
    background-image: url('smiley.gif');
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
}

If shrthnd.js converts the above into this:

.module {
    background-color: #fff;
}
.news {
  background: url('smiley.gif') no-repeat fixed center;
}

Then .news.module will end up with a transparent background color (instead of white) because the shorthand rule "resets" the value of background-color to its initial value—which is transparent.

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

No branches or pull requests

1 participant