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

Rename CSS selector names in the generated stylesheet #66

Open
yuanyan opened this issue Nov 7, 2013 · 0 comments
Open

Rename CSS selector names in the generated stylesheet #66

yuanyan opened this issue Nov 7, 2013 · 0 comments
Milestone

Comments

@yuanyan
Copy link
Contributor

yuanyan commented Nov 7, 2013

It helps reduce the size of the CSS that is sent down to your users.

For example, if you use BEM naming methodology:

.media{}
.media__img{}  /*Not used in current project*/
.media__img--rev{}
.media__body{}
<div class="media">
    <img src="logo.png" alt="Foo Corp logo" class="media__img--rev">
    <div class="media__body">
        <h3>Welcome to Foo Corp</h3>
        <p>Foo Corp is the best, seriously!</p>
    </div>
</div>

After run selector renaming task:

.a{}
.b{}
.c{}
<div class="a">
    <img src="logo.png" alt="Foo Corp logo" class="b">
    <div class="c">
        <h3>Welcome to Foo Corp</h3>
        <p>Foo Corp is the best, seriously!</p>
    </div>
</div>
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