From 68d2bc7e1752fdfd895a0a40db190169af270520 Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Mon, 23 Mar 2020 15:06:04 -0400 Subject: [PATCH] global variables feature-exists --- src/builtin/meta.rs | 2 +- tests/meta.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/builtin/meta.rs b/src/builtin/meta.rs index 21f5c9d..a734b9f 100644 --- a/src/builtin/meta.rs +++ b/src/builtin/meta.rs @@ -26,7 +26,7 @@ pub(crate) fn register(f: &mut HashMap) { Value::Ident(s, _) => match s.as_str() { // A local variable will shadow a global variable unless // `!global` is used. - "global-variable-shadowing" => Ok(Value::False), + "global-variable-shadowing" => Ok(Value::True), // the @extend rule will affect selectors nested in pseudo-classes // like :not() "extend-selector-pseudoclass" => Ok(Value::False), diff --git a/tests/meta.rs b/tests/meta.rs index d8c12e1..bec8806 100644 --- a/tests/meta.rs +++ b/tests/meta.rs @@ -44,11 +44,11 @@ test!( "a {\n color: true;\n}\n" ); // Uncomment as more features are added -// test!( -// feature_exists_global_variable_shadowing, -// "a {\n color: feature-exists(global-variable-shadowing)\n}\n", -// "a {\n color: true;\n}\n" -// ); +test!( + feature_exists_global_variable_shadowing, + "a {\n color: feature-exists(global-variable-shadowing)\n}\n", + "a {\n color: true;\n}\n" +); // test!( // feature_exists_extend_selector_pseudoclass, // "a {\n color: feature-exists(extend-selector-pseudoclass)\n}\n",