Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Add semantic classes to components #4764

Closed
wesleycho opened this issue Oct 28, 2015 · 4 comments
Closed

Add semantic classes to components #4764

wesleycho opened this issue Oct 28, 2015 · 4 comments

Comments

@wesleycho
Copy link
Contributor

We should add semantic classes to other components as appropriate in the templates to assist in styling.

@wesleycho wesleycho added this to the 1.0.0 milestone Oct 28, 2015
@pkozlowski-opensource
Copy link
Member

@wesleycho I wonder what is the motivation for this? Why people can't target custom elements we've got for our directives with their CSS selectors?

Other thought: if people want to add a custom / semantic css class they could write they own directive to target our custom elements and add whatever CSS thing they might need.

or just override a template.

@wesleycho
Copy link
Contributor Author

For some of the components (the datepicker was the main one, although that has been addressed by 97c4333), creating custom selectors is not ideal, and harder to read - this adds minimal overhead, and helps with CSS for users to override.

Overriding a template is a bit overkill when one just wants a particular class to hook into for styling, and same with a custom directive.

@pkozlowski-opensource
Copy link
Member

@wesleycho IMO this is all a question of balance. It is true that adding those classes might get things easier for some people but it is not for free. It is increasing code size for all users and add increases maintenance burden.

This is why I'm not sure we should be adding this.

@wesleycho
Copy link
Contributor Author

That is true, but in reality, I think we only need to worry about this for the datepicker, timepicker, typeahead, and rating components. I think for the datepicker and timepicker, this makes a lot of sense due to the relatively complex tables - for the typeahead and rating, maybe less so.

Thoughts?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants