Skip to content

Commit 0e7744e

Browse files
authored
Merge pull request #316 from w3c/css-variable
consumption of CSS Variable
2 parents c458d13 + a7b785a commit 0e7744e

19 files changed

+1978
-1429
lines changed

org/w3c/css/parser/CssFouffa.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,9 @@ public CssProperty handleDeclaration(String property, CssExpression expression,
587587
if (Util.onDebug) {
588588
System.err.println("Creating " + property + ": " + expression);
589589
}
590-
590+
if (property.startsWith("--")) {
591+
// css variable
592+
}
591593
final CssValue lastValue = expression.getLastValue();
592594

593595
if (allowBackslash9Hack() && lastValue != null && lastValue.hasBackslash9Hack()) {

org/w3c/css/parser/CssPropertyFactory.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,10 @@ public synchronized CssProperty createProperty(ApplContext ac, AtRule atRule, St
253253
throw new WarningParamException("vendor-extension", expression.toStringFromStart());
254254
}
255255

256+
if (expression.hasCssVariable()) {
257+
throw new WarningParamException("css-variable", expression.toStringFromStart());
258+
}
259+
256260
if (ac.getTreatCssHacksAsWarnings() && expression.hasCssHack()) {
257261
throw new WarningParamException("css-hack", expression.toStringFromStart());
258262
}

0 commit comments

Comments
 (0)