-
Notifications
You must be signed in to change notification settings - Fork 229
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
Utility namespace #87
Comments
There is no idea of including namespaced utilities (they all start with |
I disagree. Utilities from different modules can otherwise conflict in the same way as components without namespaces. Why should there be a difference between the two? |
I imagine that if you have have component specific utilities then those rules should exist in the component itself. Utilities are for common patterns that are used frequently across any number of components. Namespacing them doesn't really make sense in my experience |
Well, as long as a utility name itself defines already the exact format like for example |
Classes like that are part of the theme, not utilities. Each component should have a set of custom properties (or variables) that hold configurable things like colors and font sizes etc and then use the Check SUIT theme for an example - https://github.com/suitcss/theme |
Yeah you should be using utilities for styles that can work in any app. So theming like text styles is not suitable for utilities; you should use variables as Simon suggested. Utilities should also never be defined or changed from within a component. |
Another example: The utility |
The naming conventions do not define how to use namespaces for utilities. I have seen
u-<namespace>-<utilityName>
, but at least for me a namespace should always be at the beginning:<namespace>-u-<utilityName>
The text was updated successfully, but these errors were encountered: