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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-shared-style.html

Issue 1523843004: Add support for new CSS ::slotted() pseudo element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase / fix comments for tests (FYI) 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="resources/shadow-dom.js"></script>
3 <div id="sandbox"></div>
4 <script>
5 var shadowStyle = document.createElement('style');
6 shadowStyle.innerHTML = 'slot::slotted([data-color=red]) { color: red; }';
7
8 var sandbox = document.getElementById('sandbox');
9 sandbox.appendChild(
10 createDOM('div', {},
11 attachShadow(
12 {'mode': 'open'},
13 shadowStyle,
14 createDOM('slot')),
15 createDOM('div', {},
16 document.createTextNode('normal')),
17 // If the style is falsely shared with the <div> above, this won't turn red.
18 createDOM('div', {'data-color': 'red'},
19 document.createTextNode('red'))));
20 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698