News for hackers. Stuff that matters.
Re:Inline CSS works better in a component world by wtf_srsly on Thursday August 20, 2020 @04:55AM (#24221282)
> You can do these things in JavaScript: match your media queries in JavaScript and change the inline styles, and reimplement :hover, :focus and the likes. But I expect (without supporting measurements) that doing this for everything will be fairly bad for performance, and it will generally be less responsive (in the performance sense of the word rather than the resolution-independence sense of the word), e.g. your state-dependent styles may apply a frame later than they should.

It's also fairly bad practice to put your CSS into JavaScript for a number of reasons (such as accessibility, disabled javascript etc.).

Re:Inline CSS works better in a component world by ratww on Thursday August 20, 2020 @05:10AM (#24221369)
> It's also fairly bad practice to put your CSS into JavaScript for a number of reasons (such as accessibility

Could you explain why it would affect accessibility?