css Errors
125 error patterns
Container queries not supported
@container.*not.*supported|container-type.*unknown
- •Add container-type: inline-size to parent
- •Check browser version supports container queries
Container query: Invalid container name
container-name.*must be.*ident
- •Use valid CSS identifier for container-name
- •Don't use CSS keywords as container names
Container query: No matching container ancestor
@container.*no.*ancestor.*container
- •Add container-type to an ancestor element
- •Check container-name matches query
CSS @layer cascade ordering conflict
@layer.*order.*conflict|@layer.*specificity
- •Define layer order at top: @layer reset, base, components, utilities
- •Check layer import order
@layer not recognized by tooling
@layer.*Unknown at rule
- •Update PostCSS/Stylelint to support @layer
- •Add postcss-preset-env with stage 0
@layer with @import order error
@layer.*import.*must come.*before
- •@import with layer must be first in file
- •Move @layer declarations after imports
:has() selector not supported
:has\(\).*not.*supported|forgiving.*selector.*:has
- •Add fallback styles without :has()
- •Use @supports selector(:has(*)) for progressive enhancement
:has() causing performance issues
:has\(\).*performance|Slow selector.*:has
- •Limit :has() scope with direct child selectors
- •Avoid :has() in frequently matched selectors
:has() with complex/forgiving selector parsing
:has\(\).*complex.*forgiving
- •Browsers use forgiving parsing in :has()
- •Invalid selectors inside :has() are ignored
CSS nesting not supported
(nesting|&).*not.*supported|Unexpected.*&
- •Update browser or add postcss-nesting plugin
- •Use & before nested selectors
CSS nesting: & selector required for type selectors
CSS nesting.*& required|nesting.*compound
- •Add & before type selectors in nesting: & div {}
- •Use & to start nested rules with element selectors
CSS nesting: @media inside rule
nesting.*@media.*inside.*selector
- •Nest @media inside selectors (valid in native nesting)
- •Ensures styles apply in correct context
CSS subgrid not supported
subgrid.*not.*supported|grid-template.*subgrid.*unknown
- •Add fallback grid without subgrid
- •Use @supports (grid-template-columns: subgrid)
Subgrid on both axes considerations
subgrid.*only.*one axis|subgrid.*both.*not recommended
- •Use subgrid on one axis, explicit tracks on other
- •subgrid on both axes inherits all parent lines
View Transitions API not supported
view-transition.*not supported|::view-transition
- •Check browser support for View Transitions
- •Add @supports (view-transition-name: test) fallback
View transition: Duplicate transition name
view-transition-name.*must be unique
- •Ensure each view-transition-name is unique on page
- •Use dynamic names for list items
View transition skipped/rejected
view-transition.*skipped|startViewTransition.*rejected
- •Check no duplicate view-transition-names exist
- •Ensure element is visible during capture
CSS Anchor Positioning not supported
anchor-name|anchor\(\)|anchor-positioning.*not supported
- •Check browser compatibility (Chrome 125+)
- •Use JavaScript positioning fallback (Floating UI)
CSS Anchor: No matching anchor element
position-anchor.*no matching.*anchor
- •Ensure anchor-name matches position-anchor value
- •Check anchor element is in same containing block
CSS Anchor: position-try/position-area error
position-try-fallbacks|position-area.*invalid
- •Use valid position-area values: top, bottom, center
- •Check position-try-fallbacks syntax
Scroll-driven animations not supported
scroll-driven.*animation.*not.*supported|animation-timeline
- •Check browser support (Chrome 115+)
- •Add @supports (animation-timeline: scroll()) fallback
scroll() animation timeline not working
animation-timeline.*scroll\(\).*not.*working
- •Ensure scroll container has overflow: scroll/auto
- •Check animation-range values
view() animation timeline not triggering
animation-timeline.*view\(\).*not triggering
- •Element must enter/exit scroll port to trigger
- •Check animation-range covers element visibility
@property rule invalid or not supported
@property.*invalid.*syntax|@property.*not supported
- •Use valid syntax string: '<color>', '<length>', '<number>'
- •Set initial-value and inherits properties
@property: initial-value required
@property.*initial-value.*required
- •Add initial-value to @property definition
- •Must provide valid initial value matching syntax
@property: inherits must be true/false
@property.*inherits.*invalid
- •Set inherits: true or inherits: false
- •This is a required descriptor
color-mix() not supported or invalid
color-mix.*not supported|color-mix.*invalid
- •Check browser support (all modern browsers)
- •Use syntax: color-mix(in srgb, red 50%, blue)
oklch() color not supported
oklch.*not supported|oklch.*invalid value
- •Add fallback hex/rgb color before oklch
- •Use @supports (color: oklch(0 0 0)) detection
Wide gamut color out of range/not supported
color.*gamut.*out of range|display-p3.*fallback
- •Add sRGB fallback before wide gamut color
- •Use @media (color-gamut: p3) for progressive enhancement
Tailwind v4: @theme not recognized
(Tailwind|tailwindcss).*@theme.*not recognized
- •Update to Tailwind CSS v4+
- •Use @theme block instead of tailwind.config.js
Tailwind v4: @config deprecated pattern
(Tailwind|tailwindcss).*@config.*deprecated
- •Migrate config to CSS @theme in v4
- •Use new CSS-first configuration
Tailwind: @apply with unknown utility class
(Tailwind|tailwindcss).*@apply.*not found|@apply.*unknown utility
- •Check utility class exists in Tailwind config
- •Ensure content paths cover the class usage
Tailwind: Invalid arbitrary value syntax
(Tailwind|tailwindcss).*arbitrary.*value.*invalid
- •Use correct syntax: class-[value]
- •Escape special characters in arbitrary values
Tailwind: Dark mode classes not working
(Tailwind|tailwindcss).*dark.*mode.*not working
- •Set darkMode: 'class' or 'media' in config
- •Add 'dark' class to html/body element
Tailwind: No utility classes detected
(Tailwind|tailwindcss).*content.*no.*files|No utility classes were detected
- •Check content array paths in config/CSS
- •Ensure glob patterns match your files
CSS Modules: Composition target not found
CSS Modules.*composition.*not found|composes.*from.*not found
- •Check source file path in composes
- •Verify exported class name exists
CSS Modules: Class name conflict
CSS Modules.*class.*name.*conflict|Duplicate.*class.*export
- •Rename conflicting local class
- •Use :global() for intentional global classes
CSS Modules: Cannot compose from global
CSS Modules.*cannot.*compose.*from.*global
- •Only compose from other module classes
- •Use @value for shared values
PostCSS: Parse error (Unknown word)
PostCSS.*Unknown word|PostCSS.*Unexpected
- •Check CSS syntax is valid
- •Update PostCSS parser for modern features
PostCSS: Plugin not found
PostCSS.*plugin.*not found|Cannot find.*postcss-
- •Install the PostCSS plugin: npm install postcss-X
- •Check postcss.config.js plugin paths
PostCSS: Version incompatibility
PostCSS.*requires PostCSS 8|PostCSS.*version.*incompatible
- •Install PostCSS 8 compatible version of plugin
- •Check for peer dependency conflicts
Autoprefixer: Outdated browserslist
autoprefixer.*outdated.*browserslist
- •Update browserslist: npx update-browserslist-db@latest
- •Add .browserslistrc with target browsers
Sass: @import deprecated, use @use/@forward
(Sass|sass|SCSS).*@import.*deprecated|@import.*will be removed
- •Replace @import with @use for modules
- •Use @forward for re-exporting
Sass: Global built-in function deprecated
(Sass|sass).*global.*built-in.*deprecated
- •Use namespaced function: math.div() not math/
- •Import module: @use 'sass:math'
Sass: Slash division deprecated
(Sass|sass).*math\.div.*required|slash.*division.*deprecated
- •Use math.div($a, $b) instead of $a / $b
- •Add @use 'sass:math' at top of file
Sass: @use must come first
(Sass|sass).*@use.*must be.*before.*other rules
- •Move @use statements to top of file (before other rules)
- •Only @forward and @use before other statements
Sass: Undefined variable or member
(Sass|sass).*member.*not found|undefined variable.*\$
- •Check namespace: module.$variable
- •Import module with @use before accessing
Sass: Cannot find stylesheet to import
(Sass|sass).*Error.*Can't find stylesheet
- •Check file path and partials (_filename.scss)
- •Configure loadPaths/includePaths
Stylelint: Unknown property warning
(Stylelint|stylelint).*Unexpected unknown property
- •Add property to ignoreProperties list
- •Update Stylelint for modern CSS properties
Stylelint: Unknown @tailwind at-rule
(Stylelint|stylelint).*Unexpected unknown at-rule.*@tailwind
- •Add stylelint-config-tailwindcss
- •Configure atRules allowlist
Stylelint: Unknown theme() function
(Stylelint|stylelint).*Unexpected unknown function.*theme\(
- •Configure Stylelint for Tailwind functions
- •Add to function-no-unknown ignoredFunctions
PostCSS @import not resolving
(postcss-import|@import).*not.*resolving
- •Install postcss-import plugin
- •Add postcss-import to PostCSS config first
PostCSS Nesting: Invalid syntax
(postcss-nesting|nesting).*syntax.*invalid
- •Use & in nested selectors
- •Update postcss-nesting to latest version
Lightning CSS: Cannot parse
(lightningcss|lightning-css).*Cannot parse
- •Check CSS syntax against spec
- •Remove browser hacks not supported
Lightning CSS: Nesting not downcompiled
(lightningcss).*nesting.*target.*browsers
- •Set browser targets to include older browsers
- •Add targets in bundler config for lightning-css
z-index not working (stacking context)
z-index.*stacking.*context|z-index.*not working
- •Check if parent creates stacking context (transform, opacity, etc)
- •Create explicit stacking context with isolation: isolate
position: sticky not working
position.*sticky.*not.*working|sticky.*not sticking
- •Ensure no overflow: hidden/auto on ancestor
- •Set top/bottom value for sticky
backdrop-filter not working
backdrop-filter.*not working|backdrop.*blur
- •Add -webkit-backdrop-filter for Safari
- •Set background to semi-transparent (not fully opaque)
aspect-ratio not supported in older browsers
aspect-ratio.*not.*supported|aspect-ratio.*fallback
- •Use padding-bottom hack as fallback
- •Add @supports (aspect-ratio: 1) detection
Flex gap not supported in older browsers
gap.*not working.*flexbox|flex.*gap.*not supported
- •Use margin fallback for flex gap
- •Check browser support (Safari 14.1+)
CSS clamp()/min()/max() not supported
(clamp|min|max)\(.*not.*supported
- •Add fallback fixed value before clamp()
- •Use @supports for modern function detection
overflow: clip not supported
overflow.*clip.*not supported|overflow: clip
- •Use overflow: hidden as fallback
- •Add both: overflow: hidden; overflow: clip;
text-wrap: balance not supported
text-wrap.*balance.*not supported|text-wrap: balance
- •This is progressive enhancement, no fallback needed
- •Use @supports (text-wrap: balance) for detection
text-wrap: pretty not supported
text-wrap.*pretty.*not supported
- •Progressive enhancement: falls back to normal
- •Add for headings/hero text only
@scope rule not supported
@scope.*not.*supported|@scope.*syntax
- •Check browser support (Chrome 118+)
- •Use CSS Modules or BEM as alternative
@starting-style not supported
@starting-style.*not supported
- •Check browser support (Chrome 117+)
- •Use @keyframes as fallback for entry animations
Cannot transition display property
transition-behavior.*allow-discrete|display.*cannot.*transition
- •Add transition-behavior: allow-discrete
- •Use @starting-style for entry state
Popover API/attribute not supported
popover.*not.*supported|\[popover\].*not working
- •Check browser support (Chrome 114+)
- •Add polyfill: @oddbird/popover-polyfill
::backdrop not inheriting styles
::backdrop.*not.*styling|::backdrop.*inherited
- •::backdrop doesn't inherit from any element
- •Style directly on ::backdrop pseudo-element
Body scroll not locked with dialog/modal
(dialog|modal).*scroll.*body|body.*scroll.*lock
- •Use <dialog>.showModal() for native scroll lock
- •Add overflow: hidden to body when dialog open
Logical properties not supported
(inset|logical).*not supported|inset-inline
- •Add physical property fallback before logical
- •inset: 0 = top:0;right:0;bottom:0;left:0
content-visibility: auto causing layout shift
content-visibility.*auto.*layout shift
- •Set contain-intrinsic-size for estimated dimensions
- •Use contain-intrinsic-block-size for height
Font loading causing FOIT/FOUT
font-display.*block.*FOIT|font.*flash
- •Use font-display: swap for FOUT (preferred)
- •Preload critical fonts with <link rel=preload>
@font-face format not recognized
@font-face.*format.*not recognized|woff2.*fallback
- •Use format('woff2') string syntax
- •Add multiple format fallbacks
CSS variable fallback not working
(variable|custom property).*fallback.*not working|var\(.*fallback
- •Fallback only applies if variable is not defined (not invalid)
- •Use: var(--color, red) for undefined fallback
CSS custom property not animating
(registered|@property).*custom property.*animation
- •Register with @property and syntax: '<color>' or '<length>'
- •Unregistered custom properties can't be animated
calc() invalid expression
calc\(.*invalid.*expression|calc.*nested
- •Ensure spaces around operators: calc(100% - 20px)
- •Don't mix incompatible units without calc()
Grid auto-fill/auto-fit not working
(grid|Grid).*auto-fill.*auto-fit.*not working
- •Use minmax() with auto-fill: repeat(auto-fill, minmax(200px, 1fr))
- •auto-fill creates empty tracks, auto-fit collapses them
Grid fr unit creating 0-width columns
grid.*fr.*0|fr.*unit.*minimum
- •Use minmax(0, 1fr) to allow shrinking below content
- •Default fr minimum is min-content
Grid item overflowing its track
grid.*overflow.*item|grid item.*overflowing
- •Add min-width: 0 or overflow: hidden to grid item
- •Use minmax(0, 1fr) for track sizing
Flex item not shrinking (min-width)
(flex|Flexbox).*item.*not shrinking|flex-shrink.*not working
- •Add min-width: 0 to flex item
- •Set overflow: hidden on item
flex-basis vs width conflict
flex.*basis.*width.*conflict
- •flex-basis takes priority in flex layout
- •Use flex shorthand: flex: 1 1 200px
mix-blend-mode not working due to stacking
(mix-blend-mode|isolation).*not working.*z-index
- •Add isolation: isolate to parent to contain blending
- •Check z-index stacking context
will-change causing performance/memory issues
(will-change|GPU).*performance|will-change.*memory
- •Only apply will-change just before animation
- •Remove after animation completes
100vh includes address bar on mobile
(Safari|webkit).*100vh.*address bar|dvh.*svh.*lvh
- •Use 100dvh (dynamic viewport height)
- •Use 100svh (small viewport height)
@supports giving incorrect results
@supports.*not.*detecting|@supports.*false positive
- •Test property:value pair, not just property
- •Use @supports (property: value) exactly
Print styles not applied correctly
print.*@media print.*not working|page-break
- •Use break-before/break-after instead of page-break
- •Add @media print styles
prefers-reduced-motion not working
(prefers-reduced-motion|motion).*not detected
- •Check system accessibility settings
- •Use @media (prefers-reduced-motion: reduce)
prefers-color-scheme not updating
(prefers-color-scheme).*not updating|dark mode.*media query
- •Check OS-level dark mode setting
- •Use matchMedia('(prefers-color-scheme: dark)')
Container query units (cqi/cqw/cqh) not working
(container|@container).*cqi|cqw|cqh.*not working
- •Ensure ancestor has container-type set
- •Container units reference nearest container ancestor
Tailwind v4 import syntax change
(Tailwind|tw).*v4.*@import.*"tailwindcss"
- •Use @import 'tailwindcss' in v4 (replaces @tailwind directives)
- •Remove @tailwind base/components/utilities
Tailwind v4: Prefix configuration change
(Tailwind|tw).*v4.*prefix.*not working
- •In v4, configure prefix via @import 'tailwindcss' prefix(tw)
- •Syntax changed from config file
Tailwind: Important selector strategy not working
(Tailwind|tw).*important.*selector.*not applying
- •In v4 use @import 'tailwindcss' important('#app')
- •Check specificity of conflicting styles
CSS @layer conflicts with Tailwind
(css|CSS).*layer.*@import.*tailwind|layer.*conflict.*tailwind
- •Tailwind v4 uses layers internally
- •Don't re-wrap Tailwind in custom @layer
Animation janky/not smooth (60fps)
animation.*not.*smooth|jank|60fps
- •Only animate transform and opacity (composited)
- •Use will-change: transform for upcoming animations
transform percentage relative to element not parent
(transform|translate).*percentage.*not relative
- •transform: translate(%) is relative to element itself
- •Use position + inset for parent-relative movement
Negative outline-offset not visible
outline-offset.*negative.*not visible
- •Ensure element has dimensions larger than offset
- •Check outline isn't clipped by overflow: hidden
pointer-events: none not blocking child clicks
(pointer-events|click).*none.*child.*still clickable
- •Set pointer-events: none on children too
- •Use pointer-events: auto on specific interactive children
Dynamic viewport units need fallback
(dvw|svw|lvw|dvh|svh|lvh).*fallback.*needed
- •Add fallback: width: 100vw; width: 100dvw;
- •Check browser support for dynamic viewport units
accent-color inconsistent across browsers
(accent-color|form.*styling).*not.*consistent
- •Use accent-color for basic form theming
- •Add appearance: none for full custom styling
Tailwind CSS class not applying to element
class.*not.*applying|tailwind.*class.*no effect|utility.*not working
- •Check specificity — another CSS rule may be overriding. Use !important modifier: !text-red-500
- •Verify the class name is correct (e.g., text-grey-500 vs text-gray-500)
Tailwind purge/content removing needed classes
purge.*removed.*class|class.*missing.*production|styles.*missing.*build
- •Add all template file paths to content array in tailwind.config.js: content: ['./src/**/*.{html,ts,tsx,jsx}']
- •Don't construct class names dynamically (e.g., `text-${color}-500`) — use complete class strings
Tailwind dark mode classes not activating
dark.*mode.*not.*working|dark:.*class.*no effect
- •Set darkMode strategy in config: darkMode: 'class' (manual) or 'media' (system preference)
- •For 'class' strategy, ensure 'dark' class is on the <html> or <body> element
Tailwind custom config not loading
tailwind.*config.*not.*loading|custom.*theme.*not.*applied
- •Verify tailwind.config.js is in the project root (or specified path in PostCSS config)
- •Restart the dev server after changing tailwind.config.js — changes aren't always hot-reloaded
Tailwind @apply directive not working
@apply.*not.*working|Cannot apply.*unknown utility|@apply.*error
- •Ensure the class being applied exists in Tailwind's utility set or is defined in the config
- •@apply cannot use classes with modifiers like hover: or responsive prefixes — apply the base class and add the variant separately
Tailwind JIT mode not compiling classes
JIT.*error|tailwind.*JIT.*mode.*not.*compiling|watching.*not.*detecting
- •JIT is default since Tailwind v3 — ensure content paths are correct so the compiler can find classes
- •Restart the dev server — JIT watches files specified in content config
Tailwind arbitrary value syntax not working
arbitrary.*value.*not.*working|\[.*\].*class.*ignored
- •Ensure no spaces inside the brackets: w-[300px] not w-[ 300px ]
- •Escape special characters: content-['hello\_world'] for underscore-as-space
Tailwind plugin registration error
plugin.*not.*registered|addUtilities.*not.*function|tailwind.*plugin.*error
- •Install the plugin package: npm install @tailwindcss/forms and add to config plugins array
- •Use the correct plugin API: plugin(({ addUtilities, theme }) => { ... })
Tailwind CSS package not found by PostCSS
Cannot find module 'tailwindcss'|postcss.*tailwindcss.*not found
- •Install tailwindcss: npm install -D tailwindcss postcss autoprefixer
- •Ensure postcss.config.js includes tailwindcss: module.exports = { plugins: { tailwindcss: {}, autoprefixer: {} } }
Tailwind PostCSS version incompatibility
peer.*dependency.*postcss|postcss.*version.*incompatible.*tailwind
- •Tailwind v3 requires PostCSS 8 — upgrade: npm install -D postcss@8 autoprefixer@latest
- •If stuck on PostCSS 7, use the compatibility build: npm install -D @tailwindcss/postcss7-compat
Tailwind responsive breakpoint classes not working
responsive.*breakpoint.*not.*working|sm:|md:|lg:.*no effect
- •Tailwind uses mobile-first: sm: applies at 640px AND UP — base styles are mobile, add breakpoints for larger
- •Add viewport meta tag: <meta name='viewport' content='width=device-width, initial-scale=1'>
Tailwind group/peer modifiers not triggering
group-hover.*not.*working|peer.*modifier.*no effect
- •Add the 'group' class to the parent element: <div class='group'> and 'group-hover:' to child
- •For peer, the peer element must come BEFORE the target in the DOM (CSS ~ selector limitation)
Tailwind important modifier not taking effect
important.*modifier.*not.*overriding|!.*class.*still overridden
- •Use the ! prefix: !text-red-500 generates text-red-500 !important
- •Set important: true in tailwind.config.js to make ALL utilities !important
Tailwind animation or transition classes not working
animation.*not.*working|animate-.*no effect|transition.*class.*ignored
- •For transitions, you need both the transition utility AND the property to transition: 'transition-colors duration-300'
- •Ensure the element has different states to transition between (hover:bg-blue-500 with transition)
Tailwind container class not behaving as expected
container.*not.*centered|container.*full.*width.*issue
- •Container doesn't auto-center — add mx-auto: <div class='container mx-auto'>
- •Configure container center in config: theme: { container: { center: true, padding: '2rem' } }
Tailwind color opacity modifier not working
color.*opacity.*modifier.*not.*working|/\d{2}.*no effect
- •Use the slash syntax: bg-red-500/50 for 50% opacity (requires Tailwind v3+)
- •For older versions, use bg-opacity-50 as a separate class
Tailwind Typography plugin prose class not working
prose.*class.*not.*styling|typography.*plugin.*no effect
- •Install the plugin: npm install -D @tailwindcss/typography and add to plugins in config
- •Add the 'prose' class to the container wrapping your HTML content
Tailwind space/divide utilities not affecting children
space-.*not working|divide-.*no effect|between.*children
- •space-x/y and divide-x/y only work on direct children — they use > * + * selector
- •Ensure the parent has the class, not the children: <div class='space-y-4'> <child/> <child/> </div>
Tailwind ring utility not visible
ring.*not.*showing|ring-.*offset.*wrong|focus.*ring.*invisible
- •Ring needs both ring width AND color: 'ring-2 ring-blue-500' (default ring color may be transparent)
- •For focus rings, use: 'focus:ring-2 focus:ring-blue-500 focus:outline-none'
Tailwind @layer directive styles not applied correctly
layer.*base.*not.*working|@layer.*styles.*missing|base.*styles.*overridden
- •Ensure @tailwind base; @tailwind components; @tailwind utilities; are in your main CSS file in that order
- •Styles in @layer base have lower specificity than utilities — this is by design for overridability
z-index Not Working
z-index.*not working|z-index has no effect|stacking context
- •z-index only works on positioned elements — add `position: relative`, `absolute`, or `fixed`
- •Check for stacking context created by parent elements (opacity < 1, transform, filter, will-change)
Flexbox Content Overflow
flex.*overflow|flex item.*overflow|text overflow.*flex|flex-shrink
- •Add `min-width: 0` to the flex item — flex items default to `min-width: auto` which prevents shrinking below content size
- •For text overflow, add `overflow: hidden; text-overflow: ellipsis; white-space: nowrap` on the flex child
position: sticky Not Working
position.*sticky.*not working|sticky.*no effect|sticky.*scroll
- •Ensure a threshold is set: `top: 0` (or left/right/bottom) — sticky won't work without it
- •Check that no ancestor has `overflow: hidden`, `overflow: auto`, or `overflow: scroll` — this breaks sticky
@import Must Precede All Other Rules
@import must.*first|@import.*after|@import.*ignored|@import not at top
- •Move all @import statements to the very top of the CSS file, before any other rules or @charset
- •In SCSS/Sass, use @use instead of @import — it's order-independent and avoids this issue
SCSS/Sass Variable Undefined
Undefined variable|undefined.*\$|variable.*not found|SassError.*Undefined
- •Ensure the file defining the variable is imported before usage: `@use 'variables' as *` or `@import 'variables'`
- •Check for typos in variable name — SCSS variables are case-sensitive: `$myColor` ≠ `$mycolor`