Visual CSS Specificity Calculator - Online (0,0,1) Style
Enter a CSS selector and see its specificity broken down into A,B,C columns with a visual weight comparison. Learn specificity.
UD5 Toolkit
Compare two CSS selectors side by side and see which one wins based on specificity weight. Understand how ID, class, attribute, and element selectors stack up.
Quick Presets — Click to load
Specificity is expressed as four values: (a, b, c, d) —
a: inline styles (always 0 for selectors),
b: ID selectors,
c: classes / attributes / pseudo-classes,
d: elements / pseudo-elements.
Comparison is left-to-right: higher b wins; if equal, higher c wins, and so on.
:not(), :is(), and :has() take the highest specificity from their arguments,
while :where() always contributes zero.
#header)..menu), attribute selectors ([type="text"]), and pseudo-classes (:hover, :nth-child()).div, p) and pseudo-elements (::before, ::after).*, combinators (>, +, ~, space), and :where() contribute nothing. Compare columns left to right: the first higher value wins.
:not() — Takes the specificity of the most specific selector inside its parentheses. :not(.foo, #bar) has specificity (0,1,0,0) because #bar is an ID.:is() — Same as :not(): uses the highest specificity among its arguments.:has() — Also takes the highest specificity from its arguments (the "specificity of its most specific argument").:where() — Always has zero specificity (0,0,0,0), making it perfect for creating low-specificity base styles that are easy to override.
#my-id) contributes to column b (0,1,0,0), while a class selector (.my-class) contributes to column c (0,0,1,0). Because comparison is left-to-right, a single ID will always beat any number of classes. For example, #header (0,1,0,0) overrides .a.b.c.d.e.f.g.h.i.j (0,0,10,0), no matter how many classes are chained. This is why many modern CSS methodologies recommend avoiding IDs for styling and using classes exclusively.
* contributes zero specificity (0,0,0,0). It matches any element but doesn't add weight. For instance, *.warning has exactly the same specificity as .warning — both are (0,0,1,0). Similarly, combinators like > (child), + (adjacent sibling), ~ (general sibling), and the space (descendant) also add zero specificity.
:where() is useful — it lets you write styles that are intentionally easy to override later.
!important doesn't change specificity — it bypasses the normal cascade entirely. An !important declaration in a rule with low specificity will still beat a normal declaration with high specificity. However, !important is considered a last resort and should be used sparingly, as it makes stylesheets harder to debug and maintain. When two !important declarations conflict, specificity is used to break the tie. Overusing !important often indicates specificity wars in a codebase that should be resolved by refactoring selectors.
!important. Modern CSS best practices (including methodologies like BEM, SMACSS, and OOCSS) recommend using classes exclusively for styling. Reserve IDs for JavaScript hooks (document.getElementById) and fragment anchors. This keeps specificity flat and manageable throughout your project.
Enter a CSS selector and see its specificity broken down into A,B,C columns with a visual weight comparison. Learn specificity.
Describe your equalization difficulty and current technique to get a recommendation for which advanced method (Frenzel, BTV) to learn next.
Select a royalty‑free track source and fill in details to generate a properly formatted license attribution text for your YouTube or Vimeo description.
Select your project material (wood, metal, brick) and location (indoor/outdoor) to choose the safest and most effective paint remover. Check for hazardous chemicals.
Select playing style (rhythm, lead, strumming) and string gauge to get the recommended pick thickness in mm.
Enter material thickness and get the recommended pop rivet diameter and grip range.
Choose where page breaks should occur for printing. Get the break‑before, break‑after, and break‑inside CSS.
Create a pure CSS scroll progress indicator using animation‑timeline: scroll(). No JavaScript. Copy the complete code.
Paste your CSS and see warnings for properties that have limited browser support. Links to CanIUse. Modernize safely.
Scroll a container and see how sticky elements behave. Adjust top, bottom, and scroll margins. Copy the code.
Drag a slider over two images to see the differences instantly. Perfect for showcasing retouches or compression effects.
Load any variable font from Google Fonts or local file and play with weight, width, slant, and custom axes. Download CSS.
Browse the fonts installed on your system and type a custom phrase to see how it looks. Uses Local Font Access API where available.
Apply user‑select: none, text, all and see how it affects selection. Copy the CSS snippet for your UI elements.
Limit browser gestures on an element: pan‑x, pinch‑zoom, manipulation. Draw on a canvas to test. Mobile dev helper.
Toggle scrollbar‑gutter: stable to reserve space for the scrollbar and avoid content jumps. Visual demo with two columns.
Style underlines, overlines, and strike-throughs with colors, wavy styles, and thickness. Modern CSS text‑decoration.
Build a 3D rotating cube using pure CSS. Set dimensions, colors, and animation speed. Copy the HTML and CSS.
Design a button or card that glows on hover. Adjust shadow color, spread, and transition. Copy the CSS. Rich UI.
Type a CSS color name like 'tomato' or 'mediumseagreen' and instantly get its hex code and preview. Complete named colors list.
Create a realistic letterpress (debossed) text effect using CSS text‑shadow and background. Adjust depth and light direction. Copy code.
Generate a subtle noise/grain texture as a CSS background pattern. Adjust opacity and size. For that film look.
Create a customizable checkerboard or grid background using pure CSS gradients. Adjust cell size and colors. Copy the code.
Create a pure CSS countdown timer with a flipping number effect. Adjust duration and style. No JavaScript needed for display.
Create a rainbow gradient text animation using pure CSS. Customize speed and colors. Copy the code for your website.
Upload a small image and generate the CSS code for a custom cursor. Test it live on the page. Tiny but useful.
A complete, searchable list of all 140+ named HTML/CSS colors with their hex codes and color previews. Click to copy code. Essential web reference.
Visually experiment with Flexbox container and item properties. See the layout update in real time and copy the CSS. Learn by doing, fully interactive.
Design layered box shadows interactively and get the CSS code in real time. Adjust offset, blur, spread, and color. Essential tool for UI designers.
Visually create beautiful linear and radial gradients. Get the CSS code instantly. Copy the code or export as image. Perfect for web designers.