-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d3afaba
commit 25617e1
Showing
6 changed files
with
77 additions
and
39 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
.config/ | ||
.github/ | ||
.vscode/ | ||
dev/ | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,60 @@ | ||
class e extends HTMLElement{constructor(){super();const t=document.createElement("template");t.innerHTML=e.template(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(document.importNode(t.content,!0))}async connectedCallback(){this.shadowRoot.querySelector("ul").innerHTML=this.innerHTML,this.innerHTML=""}static template(){return"\n <style>\n /* No normal bullets please */\n ul {\n list-style-type: none;\n }\n \n li {\n color:blue;\n /* You need to turn on relative positioning so the line is placed relative to the item rather than absolutely on the page */\n position: relative;\n /* Use padding to space things out rather than margins as the line would get broken up otherwise */\n margin: 0;\n padding-bottom: 1em;\n padding-left: 20px;\n }\n \n /* The actual line being placed before each list item, tweak width and color as appropriate */\n li:before {\n background-color: #c00;\n width: 2px;\n content: '';\n position: absolute;\n top: 0px;\n bottom: 0px;\n left: 5px;\n }\n \n /* Small bullets for normal list items */\n li::after {\n content: '';\n position: absolute;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' viewBox='0 0 32 32' focusable='false'%3E%3Ccircle stroke='none' fill='%23c00' cx='16' cy='16' r='10'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-size: contain;\n left: 0;\n top: 2px;\n width: 12px;\n height: 12px;\n }\n \n /* Large bullet for the first list item */\n li:first-child::after {\n content: '';\n width: 16px;\n height: 16px;\n left: -2px;\n top: 0;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' viewBox='0 0 32 32' focusable='false'%3E%3Cpath d='M16 4c6.6 0 12 5.4 12 12s-5.4 12-12 12S4 22.6 4 16 9.4 4 16 4zm0-4C7.2 0 0 7.2 0 16s7.2 16 16 16 16-7.2 16-16S24.8 0 16 0z' fill='%23c00'%3E%3C/path%3E%3Ccircle fill='%23c00' cx='16' cy='16' r='6'%3E%3C/circle%3E%3C/svg%3E\");\n }\n \n /* Start the line further down on the first list item */\n li:first-child:before { top: 15px; }\n \n /* Stop the line short on the final list item */\n li:last-child:before { height: 6px; }\n </style>\n <ul>\n </ul>\n "}}customElements.define("wc-bullet-chain",e);export{e as WCBulletChain}; | ||
class b extends HTMLElement{constructor(){super();const a=document.createElement("template");a.innerHTML=b.template(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(document.importNode(a.content,!0))}async connectedCallback(){const a=this.shadowRoot.querySelector("ul");a.innerHTML=this.innerHTML,this.innerHTML=""}static template(){return` | ||
<style> | ||
/* No normal bullets please */ | ||
ul { | ||
list-style-type: none; | ||
} | ||
li { | ||
color:blue; | ||
/* You need to turn on relative positioning so the line is placed relative to the item rather than absolutely on the page */ | ||
position: relative; | ||
/* Use padding to space things out rather than margins as the line would get broken up otherwise */ | ||
margin: 0; | ||
padding-bottom: 1em; | ||
padding-left: 20px; | ||
} | ||
/* The actual line being placed before each list item, tweak width and color as appropriate */ | ||
li:before { | ||
background-color: #c00; | ||
width: 2px; | ||
content: ''; | ||
position: absolute; | ||
top: 0px; | ||
bottom: 0px; | ||
left: 5px; | ||
} | ||
/* Small bullets for normal list items */ | ||
li::after { | ||
content: ''; | ||
position: absolute; | ||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' viewBox='0 0 32 32' focusable='false'%3E%3Ccircle stroke='none' fill='%23c00' cx='16' cy='16' r='10'%3E%3C/circle%3E%3C/svg%3E"); | ||
background-repeat: no-repeat; | ||
background-size: contain; | ||
left: 0; | ||
top: 2px; | ||
width: 12px; | ||
height: 12px; | ||
} | ||
/* Large bullet for the first list item */ | ||
li:first-child::after { | ||
content: ''; | ||
width: 16px; | ||
height: 16px; | ||
left: -2px; | ||
top: 0; | ||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' viewBox='0 0 32 32' focusable='false'%3E%3Cpath d='M16 4c6.6 0 12 5.4 12 12s-5.4 12-12 12S4 22.6 4 16 9.4 4 16 4zm0-4C7.2 0 0 7.2 0 16s7.2 16 16 16 16-7.2 16-16S24.8 0 16 0z' fill='%23c00'%3E%3C/path%3E%3Ccircle fill='%23c00' cx='16' cy='16' r='6'%3E%3C/circle%3E%3C/svg%3E"); | ||
} | ||
/* Start the line further down on the first list item */ | ||
li:first-child:before { top: 15px; } | ||
/* Stop the line short on the final list item */ | ||
li:last-child:before { height: 6px; } | ||
</style> | ||
<ul> | ||
</ul> | ||
`}}customElements.define("wc-bullet-chain",b);export{b as WCBulletChain}; |
This file contains 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