2

Who knows?

 1 month ago
source link: https://adactio.com/journal/21007
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Who knows?

March 26th, 2024

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!

3:54pm

Tagged with css selectors properties text-emphasis file-selector-button styling frontend development knowledge knowing learning forgetting memory

Older »

Have you published a response to this? Let me know the URL:

Responses

Carter Baxter

@adactio Just this morning I stumbled across the sepia() filter. Mind blown.

# Posted by Carter Baxter on Tuesday, March 26th, 2024 at 3:58pm

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

1 Share

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

3 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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK