Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-invalid-nesting.html

Issue 1752773003: Check @apply syntax in custom properties declarations at parse time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-invalid-syntax.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <script src="../../../resources/testharness.js"></script> 2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script> 3 <script src="../../../resources/testharnessreport.js"></script>
4 <style> 4 <style>
5 #e { 5 #e {
6 width: 100px; 6 width: 100px;
7 height: 100px; 7 height: 100px;
8 background-color: red; 8 background-color: red;
9 --apply1: @apply; 9 --apply1: @apply;
10 --apply2: --red; 10 --apply2: --red;
11 --red: { background-color: red; }; 11 --red: { background-color: red; };
12 --foo: { 12 --foo: {
13 background-color: green; 13 background-color: green;
14 var(--apply1) var(--apply2); 14 var(--apply1, ) var(--apply2, );
15 }; 15 };
16 @apply --foo; 16 @apply --foo;
17 } 17 }
18 </style> 18 </style>
19 <div id=e> 19 <div id=e>
20 </div> 20 </div>
21 <script> 21 <script>
22 test(function(){ 22 test(function(){
23 assert_equals(getComputedStyle(e).backgroundColor, "rgb(0, 128, 0)"); 23 assert_equals(getComputedStyle(e).backgroundColor, "rgb(0, 128, 0)");
24 assert_equals(getComputedStyle(e).getPropertyValue("--foo"), " { background- color: green; @apply --red; }"); 24 assert_equals(getComputedStyle(e).getPropertyValue("--apply1"), "");
25 assert_equals(getComputedStyle(e).getPropertyValue("--foo"), " { background- color: green; --red; }");
25 }, "@apply inside custom properties don't get expanded if the @apply rule was " + 26 }, "@apply inside custom properties don't get expanded if the @apply rule was " +
26 "constructed from variable references"); 27 "constructed from variable references");
27 </script> 28 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-invalid-syntax.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698