Skip to content
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

Closed
jonashaefele opened this issue May 26, 2016 · 3 comments
Closed

String with whitespace causes uniteless css warning #6888

jonashaefele opened this issue May 26, 2016 · 3 comments

Comments

@jonashaefele
Copy link

jonashaefele commented May 26, 2016

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

@alexzherdev
Copy link
Contributor

Proposing a fix in #6928.

@jonashaefele
Copy link
Author

Thanks!

@jimfb
Copy link
Contributor

jimfb commented Jun 7, 2016

Fixed in #6899.

@jimfb jimfb closed this as completed Jun 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants