-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[TextField] Improve CSS API error description #19551
Comments
👋 Thanks for using Material-UI! We use GitHub issues exclusively as a bug and feature requests tracker, however, For support, please check out https://material-ui.com/getting-started/support/. Thanks! If you have a question on StackOverflow, you are welcome to link to it here, it might help others. |
@oliviertassinari it's a bug, not a support issue or question... |
The console has valueable information about the cause of this issue. |
It seems that we could fix the CSS API description: diff --git a/packages/material-ui/src/FilledInput/FilledInput.js b/packages/material-ui/src/FilledInput/FilledInput.js
index d9ba76822..7718839cc 100644
--- a/packages/material-ui/src/FilledInput/FilledInput.js
+++ b/packages/material-ui/src/FilledInput/FilledInput.js
@@ -97,7 +97,7 @@ export const styles = theme => {
adornedEnd: {
paddingRight: 12,
},
- /* Styles applied to the root element if `error={true}`. */
+ /* Pseudo-class applied to the root element if `error={true}`. */
error: {},
/* Styles applied to the `input` element if `margin="dense"`. */
marginDense: {},
diff --git a/packages/material-ui/src/Input/Input.js b/packages/material-ui/src/Input/Input.js
index cf15942fc..5f9745533 100644
--- a/packages/material-ui/src/Input/Input.js
+++ b/packages/material-ui/src/Input/Input.js
@@ -78,7 +78,7 @@ export const styles = theme => {
borderBottomStyle: 'dotted',
},
},
- /* Styles applied to the root element if `error={true}`. */
+ /* Pseudo-class applied to the root element if `error={true}`. */
error: {},
/* Styles applied to the `input` element if `margin="dense"`. */
marginDense: {},
diff --git a/packages/material-ui/src/InputBase/InputBase.js b/packages/material-ui/src/InputBase/InputBase.js
index 955a57f42..827e98514 100644
--- a/packages/material-ui/src/InputBase/InputBase.js
+++ b/packages/material-ui/src/InputBase/InputBase.js
@@ -63,7 +63,7 @@ export const styles = theme => {
adornedStart: {},
/* Styles applied to the root element if `endAdornment` is provided. */
adornedEnd: {},
- /* Styles applied to the root element if `error={true}`. */
+ /* Pseudo-class applied to the root element if `error={true}`. */
error: {},
/* Styles applied to the `input` element if `margin="dense"`. */
marginDense: {},
diff --git a/packages/material-ui/src/OutlinedInput/OutlinedInput.js b/packages/material-ui/src/OutlinedInput/OutlinedInput.js
index 9ef340a35..884c1117e 100644
--- a/packages/material-ui/src/OutlinedInput/OutlinedInput.js
+++ b/packages/material-ui/src/OutlinedInput/OutlinedInput.js
@@ -53,7 +53,7 @@ export const styles = theme => {
adornedEnd: {
paddingRight: 14,
},
- /* Styles applied to the root element if `error={true}`. */
+ /* Pseudo-class applied to the root element if `error={true}`. */
error: {},
/* Styles applied to the `input` element if `margin="dense"`. */
marginDense: {}, |
@eps1lon thanks a lot for detailed explanation and sorry for perseverance 😅 ! |
@alexmironof You can find more details in https://material-ui.com/customization/components/#pseudo-classes. |
@oliviertassinari thanks! got it |
I will try and do it now. |
Current Behavior 😯
I'm overriding
MuiBaseInput
withBut styles for
Mui-error
class is missingIf I use
withStyles
andclasses={{ error: classes.error }}
everything is ok.Expected Behavior 🤔
My styles applied for
Mui-error
classSteps to Reproduce 🕹
Sandbox demo
The text was updated successfully, but these errors were encountered: