CSS isn't magic
Subscribe
Sign in
Home
Archive
About
Latest
Top
The hidden attribute removes the need to define display: none
We don't need to define display: none by hand when creating the elements that can be shown or hidden.
Jun 11
•
Stas Melnikov
Share this post
CSS isn't magic
The hidden attribute removes the need to define display: none
Copy link
Facebook
Email
Notes
More
scroll-behavior: scroll can lead to dizziness or headache
Please, wrap it in the prefers-reduced-motion media feature.
Jun 4
•
Stas Melnikov
Share this post
CSS isn't magic
scroll-behavior: scroll can lead to dizziness or headache
Copy link
Facebook
Email
Notes
More
May 2025
We don't need to use 0 anymore to define margins and paddings
I had to make a not logical thing, i.e.
May 28
•
Stas Melnikov
Share this post
CSS isn't magic
We don't need to use 0 anymore to define margins and paddings
Copy link
Facebook
Email
Notes
More
Please, support CSS isn't magic. Get a paid subscription for $6
Hey!
May 24
•
Stas Melnikov
Share this post
CSS isn't magic
Please, support CSS isn't magic. Get a paid subscription for $6
Copy link
Facebook
Email
Notes
More
position: absolute frees us from using display: block
Are you used to defining display: block for ::before or ::after?
May 21
•
Stas Melnikov
Share this post
CSS isn't magic
position: absolute frees us from using display: block
Copy link
Facebook
Email
Notes
More
justify-content: center and align-items: center leads to loss of elements
Warning!
May 14
•
Stas Melnikov
Share this post
CSS isn't magic
justify-content: center and align-items: center leads to loss of elements
Copy link
Facebook
Email
Notes
More
Please, support CSS isn't magic. Get a paid subscription for $6
Hey!
May 10
•
Stas Melnikov
Share this post
CSS isn't magic
Please, support CSS isn't magic. Get a paid subscription for $6
Copy link
Facebook
Email
Notes
More
The gap property smashes margins!
Stop, stop, stop defining margins to set the gap between a few elements.
May 7
•
Stas Melnikov
Share this post
CSS isn't magic
The gap property smashes margins!
Copy link
Facebook
Email
Notes
More
April 2025
Let's reduce the combination of the width and max-width properties to one
The min() function allows us to define values, and browsers will choose the smallest value from them.
Apr 30
•
Stas Melnikov
Share this post
CSS isn't magic
Let's reduce the combination of the width and max-width properties to one
Copy link
Facebook
Email
Notes
More
Please, support CSS isn't magic. Get a paid subscription for $6
Hey!
Apr 26
•
Stas Melnikov
Share this post
CSS isn't magic
Please, support CSS isn't magic. Get a paid subscription for $6
Copy link
Facebook
Email
Notes
More
Reduce top: 0; right: 0; bottom: 0; left: 0 to one line!
Did you use the top, right, bottom and left properties to stretch elements over the full width and height of the parent?
Apr 23
•
Stas Melnikov
Share this post
CSS isn't magic
Reduce top: 0; right: 0; bottom: 0; left: 0 to one line!
Copy link
Facebook
Email
Notes
More
When is using display: block for ::before or ::after unnecessary?
Folks, did you define display: flex or display: inline-flex to the parent?
Apr 16
•
Stas Melnikov
Share this post
CSS isn't magic
When is using display: block for ::before or ::after unnecessary?
Copy link
Facebook
Email
Notes
More
Share
Copy link
Facebook
Email
Notes
More
This site requires JavaScript to run correctly. Please
turn on JavaScript
or unblock scripts