Helping build a better web. #CSS #JavaScript #FrontEnd #WebDev

Joined January 2011
362 Photos and videos
Pinned Tweet
I snuck this little #CSS gem into a project stylesheet to help the team remember #accessibility. 😎 #WebDev
112
2,228
5,797
Matt Smith retweeted
Let’s take a look at the 2nd :has() demo. We can make a grid for our content. Allow most cards to automatically fill a 1x1 area. And then use :has() to tell any card that has an image to instead take up a 2x2 area. article:has(img) { grid-column: span 2; grid-row: span 2; }
12
83
707
Matt Smith retweeted
18 Aug 2022
CSS is becoming πŸ”₯ I had to write so much JavaScript for snappy scrollbars and now it's just two lines of code...
48
672
4,288
Matt Smith retweeted
CSS scroll-snap is a classic CSS property; small, innocent looking API with huge potential. @argyleink showed us a whole bag of snappy tricks at #cssday Full talk: youtu.be/34zcWFLCDIc Slides: oh-snap.netlify.app/
6
75
405
Matt Smith retweeted
πŸ‘€ You may have heard of container queries, but have you heard of ✨ style queries?✨ 🎨 Style queries (also a part of the contain-level-3 spec) allow you to query for styles, not just sizes ✍🏼 I looked at some use cases & wrote up some early thoughts: una.im/style-queries/

6
67
285
Taking a peek a someone’s #CSS and now I think I’ve been activated as the Winter Solider. 😳 #WebDev
4
Matt Smith retweeted
my toxic trait is replacing flaky JS solutions with reliable CSS ones
12
7
339
Matt Smith retweeted
#a11y reminder: These are not valid: <div aria-label="hello"> <span aria-label="hi"> div and span are generic containers that can only be labelled when they are assigned a meaningful ARIA role. aria-label is prohibited on these elements. See: rawgit.com/w3c/aria/master/#…

6
65
334
Matt Smith retweeted
Blogged: "Why I don't miss React: a story about using the platform". Some notes on my experience since leaving a React focused role to work on DevTools and how surprisingly pleasant it's been. jackfranklin.co.uk/blog/work…
11
59
296
Matt Smith retweeted
10 Apr 2022
teach a label element to give itself a nice layout upgrade when it's wrapping a checkbox we :has()'nt seen nothing yet with :has()
10
86
742
CSS co-designer here. !important was added for one reason only: laws in the US that require certain text to be in a given font-size. !important stops the cascade from changing it. Anything else is probably misuse, and a sign you may not understand the cascade properly.
104
560
2,919
Matt Smith retweeted
Modern CSS can make a lot of impossible things possible, but it also simplifies some things as well. One use case that I have on pretty much every project these days is setting up a container/wrapper width with min() and margin-inline.
32
359
2,459
Matt Smith retweeted
CSS Cascade layers are coming to Chromium 99 (currently in Canary) & Firefox 97 (currently in Nightly) So what are they & how do you use them? πŸ‘€ I made a quick video to show you: youtu.be/ilrPpSQJb3U
21
128
652
Something that I’ve been curious about: If you use a pot to boil water and that’s all you use it for, do you wash the pot when you’re done? πŸ€” Okay, fight.
1
Matt Smith retweeted
1
3
15
Matt Smith retweeted
If you missed my talk yesterday, check out the article! web.dev/new-responsive/

2
34
167
Matt Smith retweeted
27 Dec 2021
πŸ”₯ CSS Features to start learning, as I expect them to ship in all browsers in 2022: 1. Container Queries 2. Cascade Layers 3. Color Functions 4. Viewport Units 5. :has() 6. Overscroll Behaviour 7. Subgrid 8. Accent Color 9. Media Query Ranges
12
297
1,449
When you think about it, all of the reasons Corey Hart lists for wearing sunglasses at night seem pretty legit.
3
Matt Smith retweeted
Input focus combined with validation πŸ‘€ lab.hakim.se/focussss/
64
473
5,041
her: β€œeat a bag of dicks” πŸ™„
3
πŸ”– A Complete Guide To Accessible Front-End Components. – :focus styles – autocomplete – content sliders – checkboxes – data charts – dark mode – date pickers – navigation – modals – radio buttons – skip links – SVGs – tabs – tables – tooltips smashingmagazine.com/2021/03…
8
409
1,419