Something like: :root { -webkit-var-mycolor : red; } won't define a new CSS variable "mycolor" because there is a space before the colon.
Created attachment 201071 [details] Patch
Created attachment 201072 [details] Patch
Comment on attachment 201072 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=201072&action=review r=me, but please do this without adding a new production > Source/WebCore/css/CSSGrammar.y.in:1623 > - VAR_DEFINITION ':' maybe_space expr prio { > + var_definition ':' maybe_space expr prio { > #if ENABLE_CSS_VARIABLES > parser->storeVariableDeclaration($1, parser->sinkFloatingValueList($4), $5); > $$ = true; Itβs unnecessary to add a new production for this. Instead you should just add the maybe_space to this production, and change $4 to $5 and $5 to $6.
Committed r149740: <http://trac.webkit.org/changeset/149740>