Created
May 14, 2015 22:07
-
-
Save sorvell/4db60358394bfc35446f to your computer and use it in GitHub Desktop.
Slot polyfill
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// polyfill for 'slot' | |
<x-slot name="scaffold-tab" slot="tab"></x-slot> | |
// produces | |
<x-slot name="scaffold-tab" slot="tab"> | |
<content select='[slot="scaffold-tab"]'></content> | |
</x-slot> | |
then... | |
<x-scaffold> | |
<x-tab slot="scaffold-tab"></x-tab> | |
<x-panel slot="scaffold-panel"></x-panel> | |
SR | |
<x-tab-panels> | |
<x-slot name="scaffold-tab" slot="tab"></x-slot> | |
<x-slot name="scaffold-panel" slot="panel"></x-slot> | |
</x-tab-panels> | |
<x-scaffold> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given this approach, 'x-tab-panels' cannot style 'x-tab' without a crazy
::content ::content x-tab
rule. (http://jsbin.com/luhomi/2/edit)