Skip to content

Commit 89cdc31

Browse files
committed
styling
1 parent 32f3508 commit 89cdc31

File tree

2 files changed

+32
-8
lines changed

2 files changed

+32
-8
lines changed

dist/index.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,19 @@
1515
display: block;
1616
aspect-ratio: 1;
1717
width: 300px;
18+
height: 300px;
1819

1920
/** Custom colours */
2021
&.blue {
2122
background-color: gold;
22-
width: 300px;
23-
height: 300px;
2423

2524
&::part(canvas) {
2625
--canvas-fill: blue;
2726
}
2827
}
2928
}
3029
</style>
31-
<script type="module" crossorigin src="/qr-element/assets/index-CLtdk9yj.js"></script>
30+
<script type="module" crossorigin src="/assets/index-CLtdk9yj.js"></script>
3231
</head>
3332
<body>
3433
<h1>Rendering a QR code</h1>

index.html

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
<meta name="description" content="A simple QR Code Web Component">
88
<script type="module" src="./src/index.mjs" blocking="rendering"></script>
99
<style>
10-
:root {
11-
color-scheme: dark light;
12-
}
13-
1410
/** Prevent CLS */
1511
qr-element {
1612
display: block;
@@ -27,6 +23,29 @@
2723
}
2824
}
2925
}
26+
27+
/** basic page styling */
28+
:root {
29+
color-scheme: dark light;
30+
}
31+
32+
a {
33+
color: red;
34+
}
35+
36+
body {
37+
margin-inline-start: auto;
38+
margin-inline-end: auto;
39+
max-width: 30rem;
40+
}
41+
42+
ul {
43+
padding: 1rem;
44+
background-color: #333;
45+
list-style-type: none;
46+
display: flex;
47+
gap: 2rem;
48+
}
3049
</style>
3150
</head>
3251
<body>
@@ -46,6 +65,12 @@ <h2> Custom colors: using the host background-color and the ::part(canvas)</h2>
4665
<qr-element class="blue" input="https://dgrammatiko.dev"></qr-element>
4766

4867
<hr>
49-
<a href="https://github.com/dgrammatiko/qr-element">Github repo</a>
68+
69+
<ul>
70+
<li><a href="https://github.com/dgrammatiko/qr-element">Github repo</a></li>
71+
<li><a href="https://github.com/dgrammatiko/qr-element">NPM package</a></li>
72+
<li><a href="https://dgrammatiko.dev">by dGrammatiko</a></li>
73+
</ul>
74+
5075
</body>
5176
</html>

0 commit comments

Comments
 (0)