-
Notifications
You must be signed in to change notification settings - Fork 5
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
Markup and naming convention #5
Comments
Prefix Markup/CSS-classes Even better would be to have a strategy for being able to configure how the actual markup comes out. Some way to override the template for the component while retaining the logic. The aim should be for "convention over configuration" and to have good solid defaults that works well for most developers and use cases, but still allow for modification without the need to fork the codebase. |
For prefix i personally prefer "ngs" as it is short and a mixture of NG and SEB while it doesnt include the full company name in it, but im oke with ngseb too. I think using bootstrap style css classes is great idea to keep our components more in sync with bootstrap and easier for bootstrap developers to use our components. but i believe every component should be able to receive custom class/ classes which can override whatever they like. |
Settled on |
We need to decide on and agree on a naming convention for the following:
Anything else?
Proposal to start the discussion
Component prefix
Pattern for markup
I'd propose that we try and follow/adhere to bootstrap markup where its applicable i.e. a button should use
.btn
for default button behavior and can be combined with for example.btn-primary
(modifier) to declare a primary button. If we invent a custom button we should still stick to this pattern and follow the BEM filosophy which for bootstrap is slightly adjusted i.e.Instead of the more "strict":
Pros:
?
Cons:
?
SASS variables
Reuse variables from bootstrap and other libraries but declare them using default value using same pattern as for prefix i.e.:
The text was updated successfully, but these errors were encountered: