Skip to content

Commit 464364e

Browse files
committed
now: apply style immediately i.e. without "blink" , so without "transition"
1 parent e0333ab commit 464364e

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

css/theme.html

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
body {
1515
font-family: Arial, sans-serif;
16-
transition: all 0.3s ease;
1716
}
1817

1918
button {
@@ -41,12 +40,6 @@
4140
</head>
4241

4342
<body>
44-
<h1>Theme Switcher Example</h1>
45-
<p>Click the buttons below to switch themes:</p>
46-
<button onclick="setTheme('light')">Light Theme</button>
47-
<button onclick="setTheme('dark')">Dark Theme</button>
48-
<button onclick="setTheme('flame')">Flame Theme</button>
49-
5043
<script>
5144

5245
// a theme is saved in localStorage ( or default )
@@ -58,6 +51,12 @@ <h1>Theme Switcher Example</h1>
5851
document.body.classList.add('theme-' + theme);
5952
}
6053
</script>
54+
55+
<h1>Theme Switcher Example</h1>
56+
<p>Click the buttons below to switch themes:</p>
57+
<button onclick="setTheme('light')">Light Theme</button>
58+
<button onclick="setTheme('dark')">Dark Theme</button>
59+
<button onclick="setTheme('flame')">Flame Theme</button>
6160
</body>
6261

6362
</html>

0 commit comments

Comments
 (0)