Show newer

Re Another classic one that would be handy, but it'll break in older browsers (so you need to split them up):
::selection, ::-moz-selection {
background: lightblue;
}

Re That code example in the previous tweet means that in IE 11, the entire selector is thrown out, making these submenus not work at all. If you split up those selectors, at least the :focus style will work.

Going forward, invalid selectors in a comma-separated chain will NOT invalidate the whole selector. But in older browsers, they DO.
/* dangerous! */
.menu:focus .submenu,
.menu:focus-within .submenu {
display: block;
}
css-tricks.com/one-invalid-pse

::marker is fantastic and now available in all the modern browsers.
@simevidas notes a favorite use-case (list markers matching size of headers):
css-tricks.com/almanac/selecto
jsbin.com/mogotoxazo/edit?html

RT Adam Argyle
✅ *fixed* conic gradient background
✅ svg masked
<button>
✅ light & dark mode
✅ clean markup
✅ beautiful & dynamic result (imo)
`background: conic-gradient(...) fixed;` 🎉
effect is like each icon is a window to a shared color dimension.. 🤓
</button>

You don't have to keep chasing the hype, says @HugoGiraudel. There is no rush, you're doing well.
css-tricks.com/there-is-no-nor

Show older
小森林

每个人都有属于自己的一片森林,也许我们从来不曾走过,但它一直在那里,总会在那里。迷失的人迷失了,相逢的人会再相逢。愿这里,成为属于你的小森林。