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 Selector violation #7

Closed
dorxy opened this issue Dec 18, 2015 · 1 comment
Closed

CSS Selector violation #7

dorxy opened this issue Dec 18, 2015 · 1 comment

Comments

@dorxy
Copy link

dorxy commented Dec 18, 2015

Great effort in trying to make all those bulky grid systems a bit more lightweight, however:
http://www.w3.org/TR/CSS21/syndata.html#characters

In particular:
In CSS, identifiers (including element names, classes, and IDs in selectors) can contain only the characters [a-zA-Z0-9] and ISO 10646 characters U+00A0 and higher, plus the hyphen (-) and the underscore (_); they cannot start with a digit, two hyphens, or a hyphen followed by a digit. Identifiers can also contain escaped characters and any ISO 10646 character as a numeric code (see next item). For instance, the identifier "B&W?" may be written as "B\&W\?" or "B\26 W\3F".

Which means that starting your classnames with digits is not such a good idea. I have come across cases where I tried to start my classes of with digits and stuff broke or was not working as expected.
There is a reason after all that all those grid libraries have classnames like two-columns and such :)

@colourgarden
Copy link
Owner

Hi Simone,

Avalanche has a variable called $av-width-class-namespace which is used to define a prefix for your width classes. By default, this variable is empty so giving the 1/2 fractional class names. However, you can set this to u- (for unit) or something similar which will give you class names such as u-1/2.

I'm considering adding an 'alpha' option which would transpose the fractions to one-of-four or something similar. Would this be useful to you?

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