-
Notifications
You must be signed in to change notification settings - Fork 46.7k
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
String with whitespace causes uniteless css warning #6888
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is the current behavior?
Assigning a style object with
content: " "
to component results in a unitless CSS warning:warning: a
divtag (owner:
unknown) was passed a numeric string value for CSS property
content(value:
) which will be treated as a unitless number in a future version of React.
Demo Fiddle with
content: ""
https://jsfiddle.net/oktkht5g/
Demo fiddle with
content: ""
https://jsfiddle.net/o014p2mf/1/
What is the expected behavior?
Only throw warnings for CSS properties that need them.
content
could be any string or one of the following values:normal | none | [ <string> | <uri> | <counter> | attr() | open-quote | close-quote | no-open-quote | no-close-quote ]+
Which versions of React
Tested in React 15.1.0
The text was updated successfully, but these errors were encountered: