Who knows?

I love it when I come across some bit of CSS I’ve never heard of before.

Take this article on the text-emphasis property.

“The what property?”, I hear you ask. That was my reaction too. But look, it’s totally a thing.

Or take this article by David Bushell called CSS Button Styles You Might Not Know.

Sure enough, halfway through the article David starts talking about styling the button in an input type="file” using the ::file-selector-button pseudo-element:

All modern browsers support it. I had no idea myself until recently.

He’s right!

Then I remembered that I’ve got a file upload input in the form I use for posting my notes here on adactio.com (in case I want to add a photo). I immediately opened up my style sheet, eager to use this new-to-me bit of CSS.

I found the bit where I style buttons and this is the selector I saw:

button,
input[type="submit"],
::file-selector-button

Huh. I guess I did know about that pseudo-element after all. Clearly the knowledge exited my brain shortly afterwards.

There’s that tautological cryptic saying, “You don’t know what you don’t know.” But I don’t even know what I do know!

Have you published a response to this? :

Responses

Beedge

@baldur this happens to me in my job as a developer on a daily basis but on a much larger scale. I have added whole features to my services or apps and then completely forgotten them, to the point that I’ll go to add a cool new bit of functionality only to see it sitting there waiting for me to discover. A gift from my younger self.

# Posted by Beedge on Wednesday, March 27th, 2024 at 10:31am

adamrice

@adactio @Meyerweb The “text-emphasis” property reproduces a customary part of Japanese typesetting. I always wind up reading this kind of dotted text like. There. Is. A. Period. After. Every. Word. Japanese typesetters historically didn’t have access to as many fonts, or font weights and variants, so they pull out all the stops with other types of decoration.

# Posted by adamrice on Thursday, March 28th, 2024 at 3:41pm

adamrice

@adactio @Meyerweb Also, that dotted text looks really weird with a proportional font. Japanese text is always monospaced.

# Posted by adamrice on Thursday, March 28th, 2024 at 3:43pm

8 Shares

# Shared by Ironorchid on Tuesday, March 26th, 2024 at 6:53pm

# Shared by Jakub Iwanowski :bash: on Thursday, March 28th, 2024 at 4:08pm

# Shared by Alexander Rutz on Thursday, March 28th, 2024 at 4:08pm

# Shared by Vanni Di Ponzano 🚴 ❤️ ☕ 🍎 on Thursday, March 28th, 2024 at 4:08pm

# Shared by Eric A. Meyer on Thursday, March 28th, 2024 at 4:08pm

# Shared by bkardell on Thursday, March 28th, 2024 at 4:09pm

# Shared by Jules 🍺 on Thursday, March 28th, 2024 at 5:41pm

# Shared by Rich C on Monday, April 1st, 2024 at 10:34am

14 Likes

# Liked by Sunny :autumnleaf6: on Tuesday, March 26th, 2024 at 7:52pm

# Liked by Giana ✨ on Tuesday, March 26th, 2024 at 9:25pm

# Liked by kriesse on Wednesday, March 27th, 2024 at 1:43pm

# Liked by Jakub Iwanowski :bash: on Thursday, March 28th, 2024 at 4:06pm

# Liked by Alexander Rutz on Thursday, March 28th, 2024 at 4:06pm

# Liked by Zack on Thursday, March 28th, 2024 at 4:07pm

# Liked by Heather Buchel on Thursday, March 28th, 2024 at 4:07pm

# Liked by Eric A. Meyer on Thursday, March 28th, 2024 at 4:07pm

# Liked by bkardell on Thursday, March 28th, 2024 at 4:07pm

# Liked by Paul Hebert on Thursday, March 28th, 2024 at 4:37pm

# Liked by Troels Thomsen on Thursday, March 28th, 2024 at 10:17pm

# Liked by Asbjørn Ulsberg on Friday, March 29th, 2024 at 11:49am

# Liked by kaiserkiwi :kiwibird: on Friday, March 29th, 2024 at 12:23pm

# Liked by stephen on Friday, March 29th, 2024 at 2:58pm

2 Bookmarks

# Bookmarked by Ange Chierchia on Sunday, March 31st, 2024 at 1:56pm

# Bookmarked by Ange Chierchia on Sunday, March 31st, 2024 at 1:56pm

Related posts

Underlines and line height

How to make the distance of link underlines proportional to the line height of the text.

Making the new Salter Cane website

A redesign with modern CSS.

CSS Day 2024

A genuinely inspiring event.

Displaying HTML web components

You might want to use `display: contents` …maybe.

Progressive disclosure defaults

If you’re going to toggle the display of content with CSS, make sure the more complex selector does the hiding, not the showing.

Related links

Quantity queries using has() selector

Here’s a handy little tool for generating CSS with :has() selectors in order to do quantity queries.

Tagged with

Who needs a flying car when you have display: grid

I’m not the only one who’s amazed by how much you can do with just a little CSS these days.

Tagged with

A Friendly Introduction to SVG • Josh W. Comeau

A fantastic explanation of the building blocks of SVG, illustrated—as always—with Josh’s interactive examples.

Tagged with

Kelp

A UI library for people who love HTML, powered by modern CSS and Web Components.

Tagged with

Matthias Ott – Painting With the Web – beyond tellerrand Düsseldorf 20025 - YouTube

A great talk by Matthias on what you can do with web standards today!

Tagged with

Previously on this day

6 years ago I wrote Apple’s attack on service workers

Kiss your service workers goodbye on iOS.

11 years ago I wrote 100 words 004

Day four.

17 years ago I wrote Boarding

I’m mobile. Fly me.

20 years ago I wrote Darwinian webolution

Websites aren’t built; they’re grown.

24 years ago I wrote New Arrival

Jessica’s iMac arrived yesterday.