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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-cascade-trick-2.html

Issue 1645433002: Basic implementation of @apply (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix expted.txt for failing test 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
OLDNEW
(Empty)
1 <!doctype html>
2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script>
4 <style>
5 #e1 {
6 --props: {
7 width: 100px;
8 background-color: red;
9 }
10 }
11 #e2 {
12 --tmp: {
13 --props: {
14 width: 0px;
15 @apply --props;
16 background-color: green;
17 height: 200px;
18 }
19 };
20 @apply --tmp;
21 }
22 #e3 {
23 @apply --props;
24 }
25 </style>
26 <div id=e1>
27 <div id=e2>
28 <div id=e3>
29 </div>
30 </div>
31 </div>
32 <script>
33 test(function(){
34 assert_equals(getComputedStyle(e3).backgroundColor, "rgb(0, 128, 0)");
35 assert_equals(getComputedStyle(e3).width, "100px");
36 assert_equals(getComputedStyle(e3).height, "200px");
37 }, "Custom property sets can be extended with the (self-referential) cascade tri ck");
38 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698