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

CSS or BS?

We show you a CSS property name. You tell us if it’s real or if we made it up. That’s it. It starts easy. It does not stay easy.

Tagged with

Progressive Web Components | Ariel Salminen

I’m slapping my forehead—progressive web components is a perfect name for what I’ve been calling HTML web components. Why didn’t I think of that?

A Progressive Web Component is a native Custom Element designed in two layers: a base layer of HTML and CSS that renders immediately, without JavaScript, and an enhancement layer of JavaScript that adds reactivity, event handling, and more advanced templating.

Tagged with

Performance-Optimized Video Embeds with Zero JavaScript – Frontend Masters Blog

This is a clever technique for a CSS/HTML only way of just-in-time loading of iframes using details and summary.

Tagged with

An in-depth guide to customising lists with CSS - Piccalilli

Think you know about styling lists with CSS? Think again!

This is just a taste of the kind of in-depth knowledge that Rich will be beaming directly into our brains at Web Day Out

Tagged with

What’s new in web typography? | Clagnut by Richard Rutter

There have been so many advances in HTML, CSS and browser support over the past few years. These are enabling phenomenal creativity and refinement in web typography, and I’ve got a mere 28 minutes to tell you all about it.

I’ve been talking to Rich about his Web Day Out talk, and let me tell you, you don’t want to miss it!

It’s gonna be a wild ride! Join me at Web Day Out in Brighton on 12 March 2026. Use JOIN_RICH to get 10% off and you’ll also get a free online ticket for State of the Browser.

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.