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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-cascade-trick.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 --props-copy: var(--props);
13 }
14 #e3 {
15 --props: {
16 @apply --props-copy;
17 background-color: green;
18 height: 200px;
19 }
20 }
21 #e4 {
22 @apply --props;
23 }
24 </style>
25 <div id=e1>
26 <div id=e2>
27 <div id=e3>
28 <div id=e4>
29 </div>
30 </div>
31 </div>
32 </div>
33 <script>
34 test(function(){
35 assert_equals(getComputedStyle(e4).backgroundColor, "rgb(0, 128, 0)");
36 assert_equals(getComputedStyle(e4).width, "100px");
37 assert_equals(getComputedStyle(e4).height, "200px");
38 }, "Custom property sets can be extended with the cascade trick");
39 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698