Earlier quoted context omitted.
Based on marketshare, Firefox can easily be excluded from "widely available"
again, "widely available" should not be intended in the general sense but as a much more precise industry term. "Baseline widely available" is defined[1] as a feature which has been available on all the core browsers (Chrome desktop and Android, Edge, Firefox desktop and Android, Safari on Mac and iOS) for two and a half years [1]: https://web.dev/baseline
Modern CSS Code Snippets: Stop writing CSS like it's 2015
311–318 of 318 posts
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#312Alternate title: "How to break your website's styling for 10-20% of your users" This is a nice reference, and some properties like `scrollbar-gutter` can be used for progressive enhancement. However, many options listed will require some kind of fallback if `autoprefixer`/`postcss`/etc. doesn't cover it, and if you don't want to exclude a large fraction of your users. It's reasonable in some cases to have both "new"…
Is it 10-20% of "your users" or 10-20% of the world but <1% of "your users"
Let me know if I'm missing something.
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#313Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#314My top list of recent CSS improvements: 1) Nested selectors. 2) :has(...). 3) :is(...), before you had to write :not(:not(...)). 4) :where(...), similar to :is(...), but the selector weight inside :where becomes 0. Useful when you need deep/complex selectors without increasing the selector weight.
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#315Earlier quoted context omitted.
Try ::before and css-counters.
::before has the same problem. You can't align text inside `content:` to the right. Probably because each ::before is handled separately and can't see the sibling's content length.
If you wrap the li contents in a div, you can handle them as a unit separately from ::before.
Then subgrid solves the problem of treating nested elements as siblings.
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#316Earlier quoted context omitted.
Are we still complaining about Tailwind? This ship has sailed. The world is so much better than the old BEM/LESS hell, it is wonderful. UnoCSS is even greater in empowering frontend developers.
BEM is actually not hell, since the whole point is to have classes with a specificity of 1, making precedence of CSS rules easy to figure out. Non-BEM CSS with ids and multi-classes everywhere was hell.
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#317Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#318Earlier quoted context omitted.
Sometimes I'm developing an internal tool or something only for myself / handful of people. I'm perfectly fine saving time and complexity using a one liner modern CSS solution instead of having to rely on some hacky unreadable code to support 10 years of legacy browsers.
The latest version of Firefox is not a legacy browser.