0

this code would work in normal css:

padding: 10 5 15 20

but in jsx inline style for react it won't also, I cannot:

styles.p: first-of-type { 
    color: red
}

I don't want to make a css file, so I want to style from each component. help?

Tyler Roper
  • 21,445
  • 6
  • 33
  • 56
gpbaculio
  • 5,693
  • 13
  • 60
  • 102
  • *"This code would work in normal css: `padding: 10 5 15 20`"* - I beg to differ! Consider reading [this question and the associated answers](http://stackoverflow.com/questions/26882177/react-js-inline-style-best-practices) for more information. – Tyler Roper Apr 13 '17 at 16:37
  • I meant in a css file, but in jsx it won't, it'd work if I do paddingLeft, paddingRight.... but it's too much typo for other styles, I don't want to override it in another css file but I am having hard time I cannot figure out, also for my buttons, I can't make selectors like first-of-type work :/ – gpbaculio Apr 13 '17 at 16:41
  • Doesn't matter what you're using, I was pointing out that your syntax won't work without a unit - `padding: 10 5 15 20` won't work without `px`. Anyway, in the link I included, it shows some alternatives. – Tyler Roper Apr 13 '17 at 16:43
  • I tried px, but it's error, thank you for the links – gpbaculio Apr 13 '17 at 16:52

0 Answers0