CSS property values that are strings shouldn't have 'px' appended
See original GitHub issueIt’s weird that style={{margin: '42'}}
gets turned into margin: 42px;
. I think we should only add px
if the value is an actual number.
Issue Analytics
- State:
- Created 9 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
CSS values and units - Learn web development | MDN
Note: Yes, CSS value types tend to be denoted using angle brackets to differentiate them from CSS properties (e.g., the color property, versus ......
Read more >CSS Values and Units Module Level 3 - W3C
This CSS module describes the common values and units that CSS properties accept and the syntax used for describing them in CSS property...
Read more >4. Values and Units - CSS: The Definitive Guide, 4th ... - O'Reilly
Everything in a stylesheet is text, but there are certain value types that directly represent strings of text as opposed to, say, numbers...
Read more >Append unit type to the result of a calculation in Sass
#{1}px ) will only create a string that looks like a number. ... to use your value in another arithmetic operation, you should...
Read more >Truncate String with Ellipsis - CSS-Tricks
.truncate { width: 250px; white-space: nowrap; overflow: hidden; ... ideally the input text field should not have support for this property ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@aweary Too late for breaking changes for 16, let’s look at doing it in 17. Can probably land soon after the release behind a flag.
Hmm. I neither see a warning, nor do I see it apply the style. I think this was fixed in 16.
https://jsfiddle.net/r44uryb1/