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

mixin namespacing #3

Open
derekprior opened this issue Jul 20, 2011 · 1 comment
Open

mixin namespacing #3

derekprior opened this issue Jul 20, 2011 · 1 comment

Comments

@derekprior
Copy link

This is more a topic for discussion/consideration than it is a bug report.

I'm using these flashes on a new project. Rather than generating a separate stylesheet for the flashes alone, I turned flashes.scss into a partial that gets imported into my main stylesheet. When I did this, a number of pre-existing mixins were overwritten. In my case, the mix-ins were defined by Compass, but it's not too hard to imagine conflicts with hand-written mix-ins.

It's simple enough to work around, with a few different options:

  1. Just keep flashes in their own stylesheet
  2. Play with the import order so the flashes get imported first then import the conflicting mixins.
  3. edit the scss to rename the mixins with a namespace prefix

I didn't bother testing #2, but it sounds like it should work. In my case, I just "namespaced" the mixins by prepending "flashes-" to the front. Do you think this is worth considering as a default?

@plapier
Copy link
Owner

plapier commented Aug 13, 2011

Indeed namespacing w/prefixes would solve this issues. I am working on turning this into a gem, which will be using our own Bourbon as a dependency for the mixins.

I have heard reports of variable conflicts as well—I will likely address this issues in the coming days.

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