|
|
|
|
|
by shados
3147 days ago
|
|
> So, yeah, you lose all the syntax highlighting etc. that comes with just writing normal CSS Except you don't. Editor support is quite good, and syntax highlighting, syntax validation, auto-completion, etc all work. I mean, same way with Vue really. If the editor didn't know wtf a Vue file is, you'd lose all the integration too. |
|
In a way, that's fair. In another way, the example single component Vue file I linked to is an HTML file. It has a <script> tag and a <style> tag. Just associate .vue with HTML and you're done.
That gets to my broader point as well - styled-components reinvents the way you declare styles and the way you apply styles, and requires the entire thing to be written as a JS file. And for what? I still don't understand what the advantage is over a syntax everyone already knows (and has validators for already!)