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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/variables/recompute-variables-when-parent-style-updates.html

Issue 1581223003: Ensure that custom property declarations are treated as inherited (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/Source/build/scripts/templates/CSSPropertyMetadata.cpp.tmpl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script>
4 <style>
5 body {
6 --a: red;
7 --b: blue;
8 }
9
10 .foo {
11 --a: green;
12 }
13
14 .container {
15 --a: var(--b);
16 }
17
18 .here {
19 background: var(--a);
20 width: 100px;
21 height: 100px;
22 }
23 </style>
24 <div id="outer">
25 <div class="here" id='red'></div>
26
27 <div class="container" id='container'>
28 <div class="here" id='blue'></div>
29 </div>
30 </div>
31
32 <script>
33 test(function() {
34 assert_equals(getComputedStyle(red).backgroundColor, "rgb(255, 0, 0)");
35 assert_equals(getComputedStyle(blue).backgroundColor, "rgb(0, 0, 255)");
36 outer.classList.add('foo');
37 assert_equals(getComputedStyle(red).backgroundColor, "rgb(0, 128, 0)");
38 assert_equals(getComputedStyle(blue).backgroundColor, "rgb(0, 0, 255)");
39 }, 'Custom properties are recomputed when parent style changes.');
40 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/templates/CSSPropertyMetadata.cpp.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698