CSS isn't magic
Subscribe
Sign in
Home
Archive
About
Latest
Top
animation without prefers-reduced-motion might lead to dizziness or headache
Motion animation might lead users with vestibular disorders to experience dizziness.
Jun 25
•
Stas Melnikov
1
Share this post
CSS isn't magic
animation without prefers-reduced-motion might lead to dizziness or headache
Copy link
Facebook
Email
Notes
More
Please, stop using resize: none
We used to use resize: none to disable textarea resizing.
Jun 18
•
Stas Melnikov
Share this post
CSS isn't magic
Please, stop using resize: none
Copy link
Facebook
Email
Notes
More
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
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
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
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
Stop to use transform functions where they aren't needed
A lot of time we have to use transform functions together even if we need to change only one.
Apr 9
•
Stas Melnikov
Share this post
CSS isn't magic
Stop to use transform functions where they aren't needed
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