Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom properties, take 2 #7555

Merged
merged 10 commits into from Sep 17, 2015

The function name var() is case-insensitive.

  • Loading branch information
SimonSapin committed Sep 17, 2015
commit 54ef8055ec67b2eb72a76f66bb678f0d619ae6e9
@@ -4,6 +4,7 @@

use cssparser::{Parser, Token, SourcePosition, Delimiter};
use properties::DeclaredValue;
use std::ascii::AsciiExt;
use std::collections::{HashMap, HashSet};
use std::sync::Arc;
use string_cache::Atom;
@@ -73,7 +74,7 @@ fn parse_declaration_value_block(input: &mut Parser, references: &mut Option<Has
return Err(())
}

Token::Function(ref name) if name == "var" => {
Token::Function(ref name) if name.eq_ignore_ascii_case("var") => {
try!(input.parse_nested_block(|input| {
parse_var_function(input, references)
}));
@@ -287,7 +288,7 @@ fn substitute_block<F>(input: &mut Parser,
let before_this_token = input.position();
let token = if let Ok(token) = input.next() { token } else { break };
match token {
Token::Function(ref name) if name == "var" => {
Token::Function(ref name) if name.eq_ignore_ascii_case("var") => {
substituted.push_str(input.slice(*start..before_this_token));
try!(input.parse_nested_block(|input| {
// parse_var_function() ensures neither .unwrap() will fail.

This file was deleted.

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.