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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-override-self.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, 10 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 #e {
6 width: 100px;
7 height: 100px;
8
9 --foo: {
10 --foo: green;
11 };
12
13 @apply --foo;
14 background-color: var(--foo);
15 }
16 </style>
17 <div id=e>
18 </div>
19 <script>
20 test(function(){
21 assert_equals(getComputedStyle(e).backgroundColor, "rgb(0, 128, 0)");
22 assert_equals(getComputedStyle(e).getPropertyValue("--foo"), " green");
23 }, "@apply can override the custom property it applies");
24 </script>
25
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698