icon

What I've read

A few notes about CSS, web performance, and news

Rodri's CSS

News 🗞️

New media query range syntax it's here!

Now we have in CSS new media queries syntax with the logical operator of javascript:


_10
@media (width >= 600px) {
_10
/*...styles*/
_10
}
_10
_10
/* When the browser is between 400px - 1000px */
_10
@media (400px <= width <= 1000px) {
_10
/*...styles*/
_10
}

Rodri's CSS

Nerding out 🤓

Understanding the EM unit in css

Em depends on the font-size of the parent, so we can use EM in paddings, gaps o margins relatives to the font-size of the element


_10
.btn {
_10
font-size: 1.5rem;
_10
padding: 1em;
_10
margin: 1em;
_10
}