I am trying to learn React and Material UI.
I am creating a web form and so far everything is good, except when the page loads, chrome auto fills the text fields with previously stored data and the background changes to yellow. How can I keep it at white?
I know in normal CSS I would include this code:
input:-webkit-autofill {
-webkit-box-shadow: 0 0 0 1000px white inset;
}
However given that this I do not necessarily have a style sheet this presents an issue.
I have so far:
const MyAwesomeReactComponent = React.createClass({
const containerStyle =
{
/* input:-webkit-autofill {
-webkit-box-shadow: 0 0 0 1000px white inset;
} */
};
return (
<div style={containerStyle}>
<form action="/login" method="post" autocomplete ="off">
<div>
<TextField hintText="Email Field" floatingLabelText="Email" underlineFocusStyle={{borderColor: Colors.amber900}} />
</div>
<div>
<TextField hintText="Password Field" floatingLabelText="Password" type="password" />
</div>
<div>
<RaisedButton label="Submit" primary={true}/>
</div>
</form>
});
module.exports = MyAwesomeReactComponent;
I am getting a Syntax error while parsing through the input-webkit-autofill
code.