-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Currently, the only way to add custom styles to a component is to use CSS selectors, which are either too broad (eg. using mwc-textfield will get all textfields) or require wrapping with an element annotated with a custom class (eg. using the rule .foo-class > mwc-textfield). This makes material-yew difficult to use with frameworks such as tailwindcss.com.
I propose a solution as follows: add a class property to all existing components. This would look similar to the following:
...
#[prop_or_default]
pub classes: Cow<'static, str>,
...
It would only be passed straight through to the underlying MWC component, so ideally each material-yew component would only have three lines of additions.
I'd be grateful to hear your thoughts on this - I'm happy to contribute such a change via a PR if you deem it to be suitable.