Skip to content

Commit 2e796fd

Browse files
authored
Update example.html
1 parent c639a95 commit 2e796fd

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

example.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,30 @@
22
<html>
33
<head>
44
<title>🌘 CSS Scope Inline Test Page</title>
5-
<script src="script.js"></script> <!-- ... or just add it inline! -->
5+
<script src="script.js"></script> <!-- ... or add as inline <script> ! -->
66
<style>
77
*,*::before,*::after{ margin: 0; box-sizing: border-box; } /* Reset */
88
html {
9-
font-size: 10px; /* Root size. Usage: 1.8 rem = 18px */
10-
text-size-adjust: none; /* Reset auto-sizing. */
11-
-webkit-text-size-adjust: none; /* Fixes safari on mobile. */
12-
background: #222; /* Prevent flash. */
9+
font-size: 10px; /* Root size. Usage: 1.8rem = 18px (1rem = 10px) */
10+
text-size-adjust: none; /* Reset auto size. */
11+
-webkit-text-size-adjust: none; /* Fix safari. */
12+
background: #222;
1313
color: #ccc;
1414
}
1515
body {
1616
font-size: 2rem; /* 2rem = 20px in our setup. */
1717
}
1818
button {
1919
font-size: 2rem;
20-
padding: 2rem 2.4rem;
21-
margin: 2rem;
2220
cursor: pointer;
2321
color: #fff;
22+
text-shadow: 0 2px #000000AA;
23+
padding: 2rem 2.4rem;
24+
margin: 2rem;
2425
background: hsl(345 100% 47%);
2526
border: 0;
2627
border-bottom: 0.5rem solid hsl(345 100% 28%);
2728
border-radius: 12px;
28-
text-shadow: 0 2px #000000AA;
2929
transition: all 0.3s;
3030
&:hover {
3131
background: hsl(345 100% 60%);
@@ -42,7 +42,7 @@
4242

4343
<div>
4444
<style> /* Simple example. */
45-
.me { margin: 10px; }
45+
.me { margin: 20px; }
4646
.me div { font-size: 5rem; }
4747
</style>
4848
<div>👻</div>
@@ -51,7 +51,7 @@
5151
<div>
5252
<style>
5353
.me {
54-
font-family: Noto Sans, sans-serif;
54+
font-family: 'Noto Sans', sans-serif;
5555
background: hsl(264 62% 20%);
5656
border:none;
5757
border-radius: 12px;
@@ -83,13 +83,13 @@
8383
.self ol li:nth-child(3) { /* ✨ .self is an alias! */
8484
background: hsl(264 80% 50%);
8585
}
86-
@keyframes \.me { /* Looped animation @keyframes can be scoped using \ */
86+
@keyframes \.me { /* ♻️ Looped animation @keyframes can be scoped using \ */
8787
0% { transform: translateY(0px); }
8888
50% { transform: translateY(20px); }
8989
100% { transform: translateY(0px); }
9090
}
9191
.me { animation: \.me 4s ease-in-out infinite; }
92-
h1, h2, h3 { font-size: 3rem; margin: 10px; } /* Global CSS syntax works untouched. */
92+
h1, h2, h3 { font-size: 3rem; margin: 10px; } /* Normal global CSS works untouched! */
9393
</style>
9494
<h1>🛸 Scoped style using .me</h1>
9595
<ol>
@@ -99,6 +99,6 @@ <h1>🛸 Scoped style using .me</h1>
9999
<li>⚡ Use live editing in the browser inspector to speed up your workflow, again!
100100
</ol>
101101
</div>
102-
<button onClick="window.open('https://github.com/gnat/css-scope-inline/blob/main/example.html');" style="font-weight: bold; font-family: sans-serif;">🐱 Visit the source code for this page.</button>
102+
<button onClick="window.open('https://github.com/gnat/css-scope-inline/blob/main/example.html');" style="font-weight: bold; font-family: sans-serif;">🐱 View code for this page.</button>
103103
</body>
104104
</html>

0 commit comments

Comments
 (0)