added some styling
This commit is contained in:
parent
3dd75c22c5
commit
a5f6c383f1
4 changed files with 33 additions and 4 deletions
BIN
font/KHMenu.otf
Normal file
BIN
font/KHMenu.otf
Normal file
Binary file not shown.
|
@ -19,12 +19,11 @@
|
|||
|
||||
<h3>Check out these custom web components below!</h3>
|
||||
|
||||
|
||||
<h4>Web Component 1</h4>
|
||||
<poots-poot>
|
||||
|
||||
<h4 slot="keyblades">my favorite keyblades</h4>
|
||||
<ul slot="list">
|
||||
<ul slot="list" style="font-family: KHMenu;">
|
||||
|
||||
<li>
|
||||
Kingdom Key
|
||||
|
|
6
main.css
6
main.css
|
@ -0,0 +1,6 @@
|
|||
@font-face {
|
||||
font-family: 'KHMenu';
|
||||
src: url('font/KHMenu.otf') format('opentype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
26
poots.js
26
poots.js
|
@ -1,6 +1,30 @@
|
|||
const template = document.createElement('template')
|
||||
template.innerHTML = `
|
||||
<div>
|
||||
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: 'KHMenu';
|
||||
src: url('font/KHMenu.otf') format('opentype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
div {
|
||||
border: 1px solid;
|
||||
}
|
||||
h2 {
|
||||
font-family: KHMenu
|
||||
}
|
||||
|
||||
:host {
|
||||
background-color: purple
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div>
|
||||
|
||||
<h2> WEPA! </h2>
|
||||
<slot name="keyblades">Default text is no slot used in html</slot>
|
||||
|
|
Loading…
Reference in a new issue