What is the difference between # and . when declaring a set of styles for an element and what are the semantics that come into play when deciding which one to use?
* { margin: 0; padding: 0; } It is odd, as removing that block in chrome web developer tools doesn't affect the layout of the page. What does this code mean, and when is it used and why?
Update Jul 2023: Modern CSS now has @container queries support for size and soon also style & state, and that basically means a native way for an if/else condition. Below is an extremely simplified example. Note - this technique can only be applied in an hierarchy and not within the same element to style itself according to its own properties.
I'm using Tailwind CSS v4 in my Next.js project and getting the following errors in globals.css: Unknown at rule @plugin css (unknownAtRules) Unknown at rule @custom-variant css (unknownAtRules) Unk...
Firefox 71+ (2019-12-03) and Chrome 79+ (2019-12-10) support internal mapping of the width and height HTML attributes of the IMG element to the new aspect-ratio CSS property.