Alpha
Parser Reference

Parser Syntax Test

Comprehensive test of AdorableCSS parser patterns and edge cases

Basic Syntax

ParsePatternDescriptionCSS Output
...relativeKeyword rule without argumentsLoading...
...w(full)Single valueLoading...
...p(10)Numeric valueLoading...
...w(100px)Value with unitLoading...
...p(md)Token referenceLoading...
...btn-primaryHyphenated rule nameLoading...
...inline_blockUnderscored rule nameLoading...

Multiple Values

ParsePatternDescriptionCSS Output
...p(10/20)Slash separatorLoading...
...border(1/solid/mute-200)Multiple slash valuesLoading...
...p(10/20/30/40)Four valuesLoading...
...font(16/1.5)Numeric slash valuesLoading...
...font(lg/1.6/-1%)Token slash valuesLoading...

Complex Values

ParsePatternDescriptionCSS Output
...hbox(top+left)Plus operator (combine values)Loading...
...layer(top:20)Colon separator (key:value)Loading...
...layer(center)Single position valueLoading...
...layer(top:10/left:20)Multiple key-value pairs (slash separated)Loading...
...layer(fill/20)Combined position and z-indexLoading...

Gradients & Ranges

ParsePatternDescriptionCSS Output
...bg(red..blue)Range/gradient syntaxLoading...
...bg(purple-500..pink-500)Color gradientLoading...
...bg(90deg/red..blue)Directional gradientLoading...
...bg(135deg/purple-500..pink-500)Angle gradientLoading...
...bg(to-tr/red..blue)Keyword direction gradientLoading...
...c(45deg/purple-500..pink-500)Text gradientLoading...

Opacity Notation

ParsePatternDescriptionCSS Output
...c(red.5)Dot opacity (50%)Loading...
...bg(black.1)Dot opacity (10%)Loading...
...c(blue-500.05)Dot opacity (5%)Loading...
...bg(primary.8)Token with opacityLoading...
...border(1/mute-200.5)Border with opacityLoading...

Calculations

ParsePatternDescriptionCSS Output
...w(100%-20)Percentage minus pixelsLoading...
...h(50%+10)Percentage plus pixelsLoading...
...w(full-20)Token with calculationLoading...
...h(100vh-60)Viewport units calculationLoading...

State Prefixes

ParsePatternDescriptionCSS Output
...hover:scale(1.05)Hover stateLoading...
...focus:ring(2/blue-500)Focus stateLoading...
...active:scale(0.95)Active stateLoading...
...disabled:opacity(0.5)Disabled stateLoading...
...checked:bg(blue-500)Checked stateLoading...
...hover:focus:c(blue-700)Multiple statesLoading...

Responsive Prefixes

ParsePatternDescriptionCSS Output
...sm:hiddenSmall breakpointLoading...
...md:w(full)Medium breakpointLoading...
...lg:grid(4)Large breakpointLoading...
...xl:text(2xl)Extra large breakpointLoading...
.....md:hiddenUp to mediumLoading...
...md..lg:blockBetween medium and largeLoading...

Special Syntax

ParsePatternDescriptionCSS Output
...size(16:9)Aspect ratioLoading...
...size(320x200)DimensionsLoading...
...w(auto)Auto keywordLoading...
...display(none)None keywordLoading...
...c(inherit)Inherit keywordLoading...
...bg(red)!Important modifierLoading...

Nested & Combined

ParsePatternDescriptionCSS Output
...hover:md:scale(1.1)State + responsiveLoading...
...md:hover:bg(mute-100)Responsive + stateLoading...
...group-hover:opacity(1)Group hoverLoading...
...peer-focus:ring(2)Peer focusLoading...
...w(full)!Rule with importantLoading...

Edge Cases

ParsePatternDescriptionCSS Output
...p()Empty parenthesesLoading...
...p( )Whitespace in parenthesesLoading...
...p(0)Zero valueLoading...
...mt(-10)Negative valueLoading...
...c(--custom-var)CSS variableLoading...
...w(calc(100%-20px))CSS calc functionLoading...

Test Custom Pattern

Parser Rules

Separators

/ Multiple values
+ Combined values
: Key-value pairs
.. Ranges/gradients
. Opacity notation

Prefixes

hover: Hover state
md: Responsive
! Important
group- Group state
.. Range prefix

Special Values

auto Auto keyword
none None keyword
full 100% token
16:9 Aspect ratio
100%-20 Calc