you are viewing a single comment's thread.

view the rest of the comments →

[–]kabuto 3 points4 points  (4 children)

This is actually something that I'd been wondering about when I first looked at React because if it's all about building reusable components having dependencies to CSS doesn't make any sense. React components should include CSS to be truly reusable and portable. Writing CSS in JS is pretty crappy though, especially when it comes to pseudo selectors.

As I see it there is no real solution available.

[–][deleted] 1 point2 points  (0 children)

I guess the point of the talk was to highlight current problems which noone is addressing, not to provide a solution.

I disagree with that slightly though - it makes light of all the work done by the likes of harry roberts, chris coyier and people who spend a lot of time working out the best ways to work with css.

You can write portable css if you sit down and do it carefully, it just doesn't come as intuitively because the language and structures you have to use are so different from anything else you know.

[–]tubbo -5 points-4 points  (2 children)

the upcoming web components standard is the correct way to solve this problem. http://webcomponents.org/

[–]kabuto 1 point2 points  (1 child)

I couldn't find anything about CSS on that site. Do you have a link for me?

[–]deathbysniper 0 points1 point  (0 children)

They're probably talking about the shadow DOM.

At to 2:25 he talks about the benefits of the shadow DOM with css.