+201223538180

Web site Developer I Advertising I Social Media Advertising I Content material Creators I Branding Creators I Administration I System SolutionManuel Matuzovic’s CSS Specificity Demo | CSS-Tips

Web site Developer I Advertising I Social Media Advertising I Content material Creators I Branding Creators I Administration I System SolutionManuel Matuzovic’s CSS Specificity Demo | CSS-Tips

Web site Developer I Advertising I Social Media Advertising I Content material Creators I Branding Creators I Administration I System Resolution

If you happen to’re searching for a primer on CSS specificity, we’ve bought that. And if you happen to’re making an attempt to get forward of the sport, try to be conscious of CSS Cascade Layers as nicely.

Screenshot of the CSS Specificity Demo.

One of many methods to assist get a grasp of CSS specificity is pondering phrases of “what beats what” or how robust the specificity is. Manuel Matuzovic has a useful interactive step-by-step demo. You retain clicking the “Add selector” button, and the CSS proven (and utilized to the web page) adjustments with ever-increasingly-strong selectors utilized to the physique that change the background-color. On the finish, it veers into not-really-selectors trickery, like utilizing @keyframes to override issues.

Extra specificity follow

If you happen to loved the trickery on the finish, try Francisco Dias’ A Specificity Battle!, an article we revealed just a few years again that does a back-and-forth styling battle with nineteen steps “deciding on” the identical factor to re-style it. CSS is cray typically.


Direct Hyperlink →

Supply hyperlink

Leave a Reply