-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Make themed values less ambiguous #6
Comments
Actually, this should be a breaking change if accepted but I think it's worth it. |
Hello @sonhanguyen, I understand your point and your pros. But there is one thing very different from Sass, it is not a variable: width: 0.123; This value will be transformed into Maybe we could have the best of two world, being able to specify "$" or to not specify it. What do you think? |
I think one of the motivations is to reduce the chance of mistake. If we do introduce $ but also implicitly lookup when there is no $, it's gonna even increase the confusion and doesn't really prevent mistakes. Per your point about the value conversion, I'm not aware it's a feature and I like to think about it as a separate thing from themed value lookup. So yes a plain number should just be I'm not a fan of functional css approaches like |
It can be a global option that once turned on you have to lookup with $ everywhere. So either use $ or not use $, no mixing. That could work π |
I will think about it, let's wait for community opinion. |
Hi, I personally vote for leaving the syntax as it is. I'll post an update when more devs will have their opinion on this topic. |
Same, at Smooth Code, we use it and it is not confusing. It depends of your theme values. Also you are able to specify |
good point |
Great library, I would say no to making it an extra char like |
Yes it will not happen, if you want "$", then feel free to prefix all variables in your theme (you can also write an helper that prefixes all variables). It will not be part of xstyled core, but feel free to create your own convention. |
Hi, great library π , I have a
π Feature Proposal
Instead of this:
maybe do this
Pitch
Pros:
Cons:
The text was updated successfully, but these errors were encountered: