I use them for code snippets with automatic line numbers, but it's literally impossible to space the numbers (relative to the code) while keeping them aligned to the right. ¯\_(ツ)_/¯
Modern CSS Code Snippets: Stop writing CSS like it's 2015
141–150 of 318 posts
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#142I 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.
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#143It'd always been the same: those ugly patches of JavaScript were being added to maintain compatibility with all the browsers... That's why the newest CSS tricks were always out of reach for us
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#144Earlier quoted context omitted.
You have any more sources on MVVM being a mistake? I found WPF rather nice to work with. Same with knockout.js and Angular I don’t see much downsides. Everyone can write bad code of course in each of them but I think it was working quite well.
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…
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
#145Earlier quoted context omitted.
You have any more sources on MVVM being a mistake? I found WPF rather nice to work with. Same with knockout.js and Angular I don’t see much downsides. Everyone can write bad code of course in each of them but I think it was working quite well.
Isn't Vue also MVVM?
People confidently write strong opinions on the internet.
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#146Earlier quoted context omitted.
Yeah let's do that. You have everything related to your component on place instead of jumping between files.
Vue, Svelte, and Surface manage to do this without forcing you to inline all your styles
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#147"The only small difference from Sass: for element selectors you need the & prefix. In Sass you could write a { color: red } inside a parent, but native CSS requires & a { color: red }."
It was true for a bit, but fixed within 2-3 releases iirc. You can now freely nav { a { color: red; } }
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#148Earlier quoted context omitted.
Obfuscate? I can learn tailwind and use it in dozens of projects. I can use tailwind in my project and onboard dozens of developers immediately. I can learn your CSS conventions and use them in exactly one project.
Why can you use CSS conventions in only one project?