CSS in 2025: Let's write html inlined styles as if it was 2005 and separation of formatting/representation was never invented. I talk of tailwind, of course.
If everything in your code is a React component, I get why you would just want to write the styles right there.[0] Then again, why write ` ` if you could just write ` ` and style it with standard CSS. [0]: https://mastrojs.github.io/blog/2025-11-27-why-not-just-use-...
Modern CSS Code Snippets: Stop writing CSS like it's 2015
261–270 of 318 posts
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#262Earlier quoted context omitted.
Jumping up and down in the file is not much better and you still need to come up with names for classes. I want to look at an element and immediately know how it's styled.
From Tailwind's home page: [...] "immediately" is a stretch
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#263Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#264Earlier quoted context omitted.
When React launched in 2013, its defining idea was strict one-way data flow: parents pass data down via props, and updates happen in a clear, explicit place. Children can't mutate parent state directly; they signal changes through callbacks. The result is predictable, traceable state changes. This contrasted with MVVM frameworks like early AngularJS, Knockout, and WPF, which relied on two-way data binding. That autom…
Thanks GPT but I know all of that. I was expecting some eye opening new evidence because person I was asking seemed really confident and using strong words. But that’s just generic „blablabla”. MVVM is not a mistake and is still plenty useful.
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#265Earlier quoted context omitted.
> React/JSX now confuses presentation and business logic React was originally designed to be the "V in MVC". You can still use it that way. React becomes very simple when you only use it as the V in MVC.
> React was originally designed to be the "V in MVC" React was originally desingned to be php in the browser. php5 -> HHVM -> Hack -> XHP -> JSX
Hack was created later though. XHP was a php 5 extension created around 2008
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#266Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#267Earlier quoted context omitted.
Tailwind is not what you're describing.
Isn’t that what utility classes are? Shorthand for inline styles? Not saying it’s good/bad, but it feels like that’s the use case
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#268CSS in 2025: Let's write html inlined styles as if it was 2005 and separation of formatting/representation was never invented. I talk of tailwind, of course.
Yeah and it's a really good idea. You can't really 'separate layout from style.' The layout and the style are both parts of the UI. HTML isn't the content, it's the layout. Even if you believe separation of concerns is the eleventh commandment, HTML and CSS are the same kind of 'concern' anyway. They're both at representation layer. Pretending you can decouple them is just burying the head in the sand.
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#269CSS in 2025: Let's write html inlined styles as if it was 2005 and separation of formatting/representation was never invented. I talk of tailwind, of course.
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#270I dislike the examples here where the "old" way works in all browsers, but the "new" way only works in Chrome/Edge. IMO, it's irresponsible to include such examples, since it makes the Blink monoculture worse.
This site shouldn't be the one to blame. Instead, we should probably ask Mozilla to be more standards-compliant.