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

CSS pass by ref-like variables #1770

Closed
samdesota opened this issue Jul 11, 2015 · 1 comment
Closed

CSS pass by ref-like variables #1770

samdesota opened this issue Jul 11, 2015 · 1 comment

Comments

@samdesota
Copy link

Hey Guys,

I recently read up on CSS Variables. One thing I noticed is that they are significantly more useful than sass variables.

Let's say you use a CSS Variable to set a variable called bodyWidth. You can use this variable anywhere in your code without containing the entire document and preventing full width items. Whenever you need something to be body width, you simply apply the variable. You can do the same with sass, except you can't change body width inside media queries. Here's a working example with CSS Variables(You need to be in FF31+): http://jsfiddle.net/tjfcu5g8/2

Resize the content container.

Obviously you don't want change the entire variable scoping method, just ones with the --var syntax so we have support until it is supported on more browsers.

Edit: Updated fiddle.

@cimmanon
Copy link

Duplicate of #340 and #1227 (and probably others)

@nex3 nex3 closed this as completed Jul 17, 2015
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

3 participants