directionality-002.tentative.html (811B)
1 <!doctype html> 2 <title>Directionality is properly computed for slotted children</title> 3 <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> 4 <link rel="author" title="Mozilla" href="https://mozilla.org"> 5 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1562425"> 6 <link rel="match" href="directionality-002-ref.html"> 7 <style> 8 .slotted { 9 width: 100px; 10 height: 100px; 11 background: red; 12 } 13 .slotted:dir(rtl) { 14 background: green; 15 } 16 </style> 17 <body dir="rtl"> 18 <script> 19 let root = document.createElement("div") 20 let slotted = document.createElement("div"); 21 slotted.className = "slotted"; 22 root.appendChild(slotted); 23 root.attachShadow({ mode: "open" }).appendChild(document.createElement("slot")); 24 document.body.appendChild(root); 25 </script>