CSS :has() Interactive Guide
This isn’t just a great explanation of :has()
, it’s an excellent way of understanding selectors in general. I love how the examples are interactive!
This isn’t just a great explanation of :has()
, it’s an excellent way of understanding selectors in general. I love how the examples are interactive!
This free event is running online from 3pm to 7pm UK time this Friday. The line-up features Emily Bender, Safiya Noble, Timnit Gebru and more.
Since the publication of On the Dangers of Stochastic Parrots: Can Language Models Be Too Big?🦜 two years ago, many of the harms the paper has warned about and more, have unfortunately occurred. From exploited workers filtering hateful content, to an engineer claiming that chatbots are sentient, the harms are only accelerating.
Join the co-authors of the paper and various guests to reflect on what has happened in the last two years, what the large language model landscape currently look like, and where we are headed vs where we should be headed.
A terrific tour of just some of the fantastic ways you can use :has()
in CSS.
The section on using it with sibling selectors blew my mind:
How often have you wanted to adjust the margins on a headline based on the element following it? Now it’s easy. This code allows us to select any h2 with a p immediately after it.
h2:has(+ p) { margin-bottom: 0; }
Amazing.
The algorithm I’m going after is pretty simple: If the grid of items has an odd number of items, then make the first item full-width. But CSS can’t do logic… right? Well… hold my proverbial beer.
This would be such a great addition to CSS—a parent/ancestor selector!
With the combined might of :has()
, :not()
, nth-child()
, and calc()
, CSS has become a powerful language for specifying rules to account for all kinds of situations.
Bruce reveals that the theory and the reality are somewhat different when it comes to the accessibility of inline elements like em
and strong
.
Look, it’s Friday—were you really going to get any work done today anyway?
A great collection of learned lessons from implementing service workers.
I really, really like it when people share their own personal experiences and “gotchas!” like this.
A thoroughly lovely look at the octothorpe that skewers a myth or two along the way.
I despair sometimes.
Here’s a ridiculous Heath-Robinsonesque convoluted way of getting the mighty all-powerful Googlebot to read the web thangs you’ve built using the new shiny client-side frameworks like Angular, Ember, Backbone…
Here’s another idea: output your HTML in HTML.
That solution works for machines and humans. As a bonus, outputting your HTML in HTML avoids turning JavaScript into a single point of failure.
Looks like the scourge of hashbangs is finally being cleansed from Twitter.
I really like the thinking that’s gone into the design of Github, as shown in this presentation. It’s not really about responsive design as we commonly know it, but boy, is it a great deep dive into the importance of URLs and performance.
A superb post by Dan on the bigger picture of what’s wrong with hashbang URLs. Well written and well reasoned.
James follows up on his previous excellent post on hashbangs by diving into the situations where client-side routing is desirable. Watch this space for a follow-up post on performance.
Bobbie documents the work of Jan Chipchase, currently looking into the design decisions behind counterfeit goods on sale in Shanghai.
William Shatner and David Hasselhoff (circa 1984) are righting wrongs and taking Obama and McCain to the mat for the biggest brass ring in the country. From yesterday's tomorrow, for a better today!
These thoughts on identity control reminded me of The Laughing Man from the first series of Ghost In The Shell: Stand Alone Complex (and not just because Jan Chipchase lives in Tokyo): "People like to manage and manipulate (with various degrees…
Watch the best car chase of all time mashed up with a map of San Francisco to create geo-broadcasting. The added context gives an already perfect sequence added zing.
With a disgusting disregard for history, the Bexhill home of John Logie Baird has been demolished. Here's a potted biography of the proto-geek who steampunked his way into our living rooms.
I'm loving this mashup of lolcats, Twitter and Flickr. Occasionally the text and the picture matches up in a serendipitously hilarious way.