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

Can't use numerics as custom suffixes when allowSuffixToValue is true #125

Open
src-code opened this issue Mar 25, 2015 · 1 comment
Open
Labels
bug package/atomizer Issues for atomizer package
Milestone

Comments

@src-code
Copy link
Contributor

Right now it's not possible to have a custom suffix that's numeric if a rule has allowSuffixToValue set to true, such as Fz-10. Currently such a class would be translated into:

.Fz-10 {
  font-size: 10;
}

...which isn't valid.

The problem is that sometimes numerics are valid values, such as in the case of z-index, font-weight, or line-height, but in all other cases, a unit of measure (eg px) would be required.

I propose that we add a boolean to the rules that basically declares that for a given rule, the suffix-to-value requires a unit of measure. Something like suffixRequiresUnit, though I'm not sure how to best word it. By default this setting would be true, but would be false for the exceptions such as the ones listed above.

@renatoi @thierryk thoughts?

@src-code src-code added this to the 2.1.0 milestone Mar 25, 2015
@src-code src-code added the bug label Mar 25, 2015
@thierryk
Copy link
Contributor

Makes sense to me

@src-code src-code modified the milestones: 3.0.0, 2.1.0 Apr 9, 2015
@renatoi renatoi modified the milestones: 3.1.0, 3.0.0 Apr 23, 2015
redonkulus pushed a commit that referenced this issue Jul 14, 2022
redonkulus pushed a commit that referenced this issue Jul 14, 2022
@redonkulus redonkulus added the package/atomizer Issues for atomizer package label Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug package/atomizer Issues for atomizer package
Projects
None yet
Development

No branches or pull requests

4 participants