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

Side by Side Diff: LayoutTests/fast/dom/shadow/inner-scope-important-wins.html

Issue 1224673002: Implement proposed shadow tree cascade order. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added documentation Created 5 years, 4 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/js-test.js"></script>
3 <script src="resources/shadow-dom.js"></script>
4 <div id="sandbox"></div>
5 <script>
6 description("Inner scope !important rules wins, even with lower specificity.");
7
8 sandbox.appendChild(
9 createDOM('div', {'id': 'host'},
10 createShadowRoot(
11 createDOM('style', {},
12 document.createTextNode(
13 '::content span { color: green !important; }')),
14 createDOM('content', {})),
15 createDOM('style', {},
16 document.createTextNode(
17 '#target { color: red !important; }')),
18 createDOM('span', {'id': 'target'})));
19
20 shouldBeEqualToString("getComputedStyle(target).color", "rgb(0, 128, 0)");
21 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698