Skip to content

Commit 55e11f1

Browse files
authored
Update example.html
1 parent 06cd344 commit 55e11f1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

example.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@
3232

3333
<div>
3434
<style>
35-
.me { font-family: 'Noto Sans', sans-serif; background: hsl(264 62% 20%); border:none; border-radius: 12px; box-shadow: 0 2px 5px #00000044; padding: 10px 20px; color: #fff; margin: 20px;
36-
/* CSS Nesting works! */
35+
/* One selector, flat style. */
36+
.me { font-family: 'Noto Sans', sans-serif; background: hsl(264 62% 20%); }
37+
/* One selector, nested style. */
38+
.me { border:none; border-radius: 12px; box-shadow: 0 2px 5px #00000044; padding: 10px 20px; color: #fff; margin: 20px;
3739
& span { background: hsl(264 90% 90%); color: hsl(264 30% 40%); padding: 16px 20px; border-radius: 8px; box-shadow: 0 0 5px hsl(0 0% 0% / 20%);
3840
&::before { content:'🔮'; padding: 0 1ch 0 0; }
3941
}
4042
}
41-
/* Flat style can be more readable! 1 selector per line. */
43+
/* One selector, flat style can be more readable! */
4244
.me ol { padding: 5px 0; }
4345
.me ol li { list-style: disc; padding: 4px; border-radius: 12px; margin: 4px 20px }
4446
/* ✨ .this and .self alias .me ! */
@@ -100,7 +102,7 @@ <h2>Responsive Design 🔛 Resize the window!</h2>
100102
<br />
101103

102104
<h2>HTMX Test</h2>
103-
<script src="https://unpkg.com/htmx.org@1.9.5"></script>
105+
<script src="https://unpkg.com/htmx.org@1.9.5" defer></script>
104106
<div>Swapped DOM elements are styled instantly when they arrive.</div>
105107
<button garlic hx-get="https://gnat.github.io/css-scope-inline/example.html" hx-select="button[garlic]" hx-swap="afterend">
106108
<style>

0 commit comments

Comments
 (0)