-
Notifications
You must be signed in to change notification settings - Fork 25
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
Ability to style Textfield elements using inline styles #58
Comments
The problem is amplified when the The more I think about it, the more the issue seems to be related to styling only. In other words:
Perhaps it might help if we learn how other toolkits are doing it. Here's the rule in Material-UI:
|
OK. So in the upcoming v1, Material UI seems to have given up completely on "Rule 1" from above. "xxxStyles" are nowhere to be seen. "Rule 2" seems to be 100% enforced though. The only thing they allow, in their
Would that work for us? E.g. follow a simple pattern where the user can supply a className string prop which is always assigned to the root element of the component, as well as one or more "xxxClassName" properties that - if supplied - will be assigned to the major sub-elements in the component's element tree? This seems like a simple change, which has the added benefit that it can be used with a CSS-in-JS or with regular CSS rules. |
Any feedback? Ability to style components is crucial if the library is to gain traction in the community... |
Thank you for analyze, sure it make sense. I'll extend components by xxxClassName props. |
See #57.
For
<Textfield>
there is a similar (but not identical) issue. "...otherProps" are put on the<input>
element, and not on the<div>
(Field) element. While I see the rationale for this (very often you would like to push properties to the input element, as this is the one which interacts with the user), this precludes us from styling the Textfield element as a whole. For example, how am I supposed to make it occupy 100% width? Perhaps, I'm missing the elephant here...The text was updated successfully, but these errors were encountered: