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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/variables/variable-resolution-order-independent.html

Issue 1573423002: CSS Custom Properties fail when defined in specific order (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding testcase 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/core/css/resolver/CSSVariableResolver.cpp » ('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 div {
6 width: 100px;
7 height: 100px;
8 }
9 #firstdiv {
10 --green: green;
11 --clr: var(--green);
12 --foo: var(--clr);
13 --bar: var(--clr);
14 background-color: var(--bar);
15 }
16 #seconddiv {
17 --green: green;
18 --clr: var(--green);
19 --bar: var(--clr);
20 --foo: var(--clr);
21 background-color: var(--bar);
22 }
23 </style>
24
25 <div id="firstdiv"></div>
26 <div id="seconddiv"></div>
27
28 <script>
29 test(function() {
30 assert_equals(getComputedStyle(firstdiv).backgroundColor, 'rgb(0, 128, 0)');
31 assert_equals(getComputedStyle(seconddiv).backgroundColor, 'rgb(0, 128, 0)');
32 }, 'Background color needs to resolved to green independent of ordering of varia ble declaration.');
33 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698