| 1 |
|
| 2 |
<!doctype html> |
| 3 |
|
| 4 |
<html lang="en"> |
| 5 |
<head> |
| 6 |
<meta charset="utf-8"> |
| 7 |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 8 |
<title><my-element> ⌲ Examples ⌲ Basic</title> |
| 9 |
<link rel="stylesheet" href="../docs.css"> |
| 10 |
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600|Roboto+Mono"> |
| 11 |
<link href="../prism-okaidia.css" rel="stylesheet" /> |
| 12 |
<script src="/node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script> |
| 13 |
<script src="/node_modules/lit/polyfill-support.js"></script> |
| 14 |
<script type="module" src="../my-element.bundled.js"></script> |
| 15 |
</head> |
| 16 |
<body> |
| 17 |
|
| 18 |
<header> |
| 19 |
<h1><my-element></h1> |
| 20 |
<h2>A web component just for me.</h2> |
| 21 |
</header> |
| 22 |
|
| 23 |
<nav> |
| 24 |
<a href="../">Home</a> |
| 25 |
<a href="">Examples</a> |
| 26 |
<a href="../api/">API</a> |
| 27 |
<a href="../install/">Install</a> |
| 28 |
</nav> |
| 29 |
<div id="main-wrapper"> |
| 30 |
<main> |
| 31 |
|
| 32 |
<h1>Example: Basic</h1> |
| 33 |
<section class="examples"> |
| 34 |
<nav class="collection"> |
| 35 |
<ul> |
| 36 |
|
| 37 |
<li class=selected> |
| 38 |
<a href="">A basic example</a> |
| 39 |
</li> |
| 40 |
|
| 41 |
<li class=> |
| 42 |
<a href="name-property/">Setting the name property</a> |
| 43 |
</li> |
| 44 |
|
| 45 |
</ul> |
| 46 |
</nav> |
| 47 |
<div> |
| 48 |
<style> |
| 49 |
my-element p { |
| 50 |
border: solid 1px blue; |
| 51 |
padding: 8px; |
| 52 |
} |
| 53 |
</style> |
| 54 |
<my-element> |
| 55 |
<p>This is child content</p> |
| 56 |
</my-element> |
| 57 |
<h3>CSS</h3> |
| 58 |
<pre class="language-css"><code class="language-css"><span class="token selector">p</span> <span class="token punctuation">{</span><br> <span class="token property">border</span><span class="token punctuation">:</span> solid 1px blue<span class="token punctuation">;</span><br> <span class="token property">padding</span><span class="token punctuation">:</span> 8px<span class="token punctuation">;</span><br><span class="token punctuation">}</span></code></pre> |
| 59 |
<h3>HTML</h3> |
| 60 |
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>my-element</span><span class="token punctuation">></span></span><br> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>p</span><span class="token punctuation">></span></span>This is child content<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>p</span><span class="token punctuation">></span></span><br><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>my-element</span><span class="token punctuation">></span></span></code></pre> |
| 61 |
|
| 62 |
</div> |
| 63 |
</section> |
| 64 |
|
| 65 |
</main> |
| 66 |
</div> |
| 67 |
|
| 68 |
<footer> |
| 69 |
<p> |
| 70 |
Made with |
| 71 |
<a href="https://github.com/lit/lit-element-starter-ts">lit-starter-ts</a> |
| 72 |
</p> |
| 73 |
</footer> |
| 74 |
</body> |
| 75 |
</html> |