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 short-names module with mixin names that are shorter than the defaults #61

Open
kakubei opened this issue Mar 10, 2014 · 3 comments
Milestone

Comments

@kakubei
Copy link

kakubei commented Mar 10, 2014

This migh sound like a stupid question, but I've got some elements where I'm using zen-clear() for some pages, but then in one particular page I need to remove the zen-clear() statement cause it's causing problems. I've got a SCSS file for that page but am wondering how do I negate the zen-clear() mixin?

It gets inherited from the other css since it's only a small change I don't want to redo the whole page for just 1 element.

Thanks.

@JohnAlbin
Copy link
Owner

Hi @kakubei! I'm working on #48 which will give you exactly what you want in Zen Grids 2.0.

You can get similar functionality with Zen Grids 1.x by adding this custom mixin to your codebase. (I won't be adding it officially to the 1.x branch.)

@mixin undo-zen-clear() {
  clear: none;
}

As to what selector to use, I suggest adding a custom class to that element on that one page. Basically, that element has a "variant" on that page. You should be able to reuse that variant class on any other pages that need that variation.

@kakubei
Copy link
Author

kakubei commented Mar 12, 2014

Great, thanks a lot John. And thanks for Zen grids, I really like it and plan to use it in my future web sites when I can get away with it.

The only little niggle I have is I wish the mixins where shorter, they're hard to remember (zen-grid-container as opposed to 'container' for example, etc), but I guess you chose those names to make sure they didn't conflict with anything else.

Maybe in the future we could create aliases for them :)

@JohnAlbin
Copy link
Owner

Maybe in the future we could create aliases for them.

Now that's an idea! Have an optional module with short names. So you'd @import zen-grids/short-names; and then use the really short mixin names instead of the longer ones.

@JohnAlbin JohnAlbin changed the title Turn off zen-clear(); Add short-names module with mixin names that are shorter than the defaults Oct 22, 2015
@JohnAlbin JohnAlbin added this to the 2.x milestone May 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants