6 CSS pseudo-elements every beginner should know ๐
::before ::after ::first-line ::first-letter ::marker ::selection
Small selectors, lots of design control.
Watch the full breakdown: https://t.co/ow1zab4z1A
#CSS#WebDevelopment#Frontend
A tiny CSS detail many developers overlook:
::selection
It lets you customize how text looks when the user selects it.
Small detail. Better design consistency.
https://t.co/ow1zab4z1A
#CSS#UX#WebDesign
A tiny CSS detail many developers overlook:
::selection
It lets you customize how text looks when the user selects it.
Small detail. Better design consistency.
https://t.co/ow1zab4z1A
#CSS#UX#WebDesign
Your list bullets don't have to be boring.
With ::marker, you can customize them:
li::marker {
content: "๐จ";
}
CSS gives you more control than you might expect.
https://t.co/ow1zab4z1A
#CSS#WebDev#Frontend
Your list bullets don't have to be boring.
With ::marker, you can customize them:
li::marker {
content: "๐จ";
}
CSS gives you more control than you might expect.
https://t.co/ow1zab4z1A
#CSS#WebDev#Frontend
Try:
p::first-letter {
font-size: 30px;
}
One tiny pseudo-element can completely change the look of your typography.
https://t.co/ow1zab4z1A
#CSS#Typography#WebDesign
Try:
p::first-letter {
font-size: 30px;
}
One tiny pseudo-element can completely change the look of your typography.
https://t.co/ow1zab4z1A
#CSS#Typography#WebDesign
::first-line = entire first line ::first-letter = only the first letter
Easy distinction. Easy to remember.
https://t.co/ow1zab4z1A
#CSS#CodingTips#FrontendDevelopment
::first-line = entire first line ::first-letter = only the first letter
Easy distinction. Easy to remember.
https://t.co/ow1zab4z1A
#CSS#CodingTips#FrontendDevelopment
design tip ๐ฒ - size icons with ๐ท๐๐๐, not ๐๐ก.
๐ท๐๐๐ is the height of a capital letter in the current font, so the icon tracks the text at any size:
.๐๐๐๐๐ {
๐๐๐๐๐๐๐ข: ๐๐๐๐ก;
๐๐๐๐๐-๐๐๐๐๐: ๐๐๐๐๐๐๐๐;
}
.๐๐๐๐๐ ๐๐๐ {
๐๐๐๐๐-๐๐๐ฃ๐: ๐ท๐๐๐;
}
๐๐๐๐๐๐๐๐ sits the icon on the text's baseline, so it spans the caps in any font. the width follows the ๐๐๐๐ ๐ฑ๐๐ก.
Resize your browser.
The words on the first line can change.
::first-line still targets the correct line automatically.
That's a neat CSS trick beginners should know.
https://t.co/ow1zab4z1A
#CSS#LearnCSS#WebDev
CSS variables have been quietly zeroing out styles. ๐ฌ
`revert-rule` is Baseline, newly available since September 2026 (Chrome 148, Firefox 150, Safari 27).
Before this, `padding: var(--pad)` with no --pad set gave you padding: 0, so you copy-pasted the default into every fallback.
Now โคต๏ธ fall back to whatever the cascade had.
Resize your browser.
The words on the first line can change.
::first-line still targets the correct line automatically.
That's a neat CSS trick beginners should know.
https://t.co/ow1zab4z1A
#CSS#LearnCSS#WebDev