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

Add $prefix in SASS to allow scoping of CSS #4

Closed
mrchess opened this issue Feb 17, 2013 · 4 comments
Closed

Add $prefix in SASS to allow scoping of CSS #4

mrchess opened this issue Feb 17, 2013 · 4 comments

Comments

@mrchess
Copy link

mrchess commented Feb 17, 2013

It would be useful if the SASS had a "prefix" option where I could specify the prefix for all the CSS classes.

More discussion the value of a $prefix could be found here: twbs/bootstrap#1287

@zackbloom
Copy link
Contributor

Makes sense to me, it will also be necessary to add the ability to pass that prefix into the javascript, so it can reference the classes appropriately.

@mrchess
Copy link
Author

mrchess commented Feb 21, 2013

I guess .messenger is really the prefix already by design. I ended up replacing all messenger in the CSS into a $prefix, and for JS I added a baseCSSPrefix global which has the same prefix the swapped out messenger with #{baseCSSPrefix} in the templates -- similar to Ext 4s method for their Sandbox Mode. (http://dev.sencha.com/deploy/ext-4.0.0/overview/index.html)

@zackbloom
Copy link
Contributor

PR?

@mrchess
Copy link
Author

mrchess commented Feb 21, 2013

I'll send one up soon. I realized I wasn't sure if it is a good idea to
merge it in since in a way it adds some overhead as you meed to type
#{prefix} all the time which can get kind of annoying in practice.

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

2 participants