Skip to content

Commit c258ae4

Browse files
committed
New version
1 parent 1a69afb commit c258ae4

File tree

11 files changed

+60
-63
lines changed

11 files changed

+60
-63
lines changed

demo/common.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828

2929
body {
3030
margin: 0;
31-
transition: color var(--duration) var(--timing),
31+
transition:
32+
color var(--duration) var(--timing),
3233
background-color var(--duration) var(--timing);
3334
font-family: sans-serif;
3435
font-size: 12pt;

demo/dark-mode-toggle-playground.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727
colorScheme.content = e.detail.colorScheme;
2828
icon.href = e.detail.colorScheme === 'dark' ? 'moon.png' : 'sun.png';
2929
console.log(
30-
`${e.target.id} changed the color scheme to ${e.detail.colorScheme}`,
30+
`${e.target.id} changed the color scheme to ${e.detail.colorScheme}`,
3131
);
3232
});
3333

3434
doc.addEventListener('permanentcolorscheme', (e) => {
3535
const permanent = e.detail.permanent;
3636
console.log(
37-
`${permanent ? 'R' : 'Not r'}emembering the last selected mode.`,
37+
`${permanent ? 'R' : 'Not r'}emembering the last selected mode.`,
3838
);
3939
});
4040
})(document);

demo/dist.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<title>Hello Dark Mode</title>

demo/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<title>Hello Dark Mode</title>

demo/slider.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ dark-mode-toggle.slider::part(toggleLabel)::before {
2222
height: calc(var(--dark-mode-toggle-icon-size, 1rem) * 1.5);
2323
width: calc(var(--dark-mode-toggle-icon-size, 1rem) * 1.5);
2424
border-radius: 100%;
25-
box-shadow: 0 0.15em 0.3em rgb(0 0 0 / 15%), 0 0.2em 0.5em rgb(0 0 0 / 30%);
25+
box-shadow:
26+
0 0.15em 0.3em rgb(0 0 0 / 15%),
27+
0 0.2em 0.5em rgb(0 0 0 / 30%);
2628
background-color: #fff;
2729
color: #333;
2830
transition: 0.4s;

demo/unstyled.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />

demo/with-flashing.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head>
44
<link

demo/without-flashing.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head>
44
<noscript id="dark-mode-toggle-stylesheets">

eslint.config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// eslint.config.js
2+
module.exports = [
3+
{
4+
languageOptions: {
5+
ecmaVersion: 8,
6+
sourceType: 'module',
7+
},
8+
rules: {
9+
'require-jsdoc': 'off',
10+
'max-len': [
11+
'error',
12+
{
13+
ignoreTemplateLiterals: true,
14+
},
15+
],
16+
},
17+
},
18+
];

package.json

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -52,30 +52,6 @@
5252
"stylelint-config-standard": "^36.0.1",
5353
"terser": "^5.33.0"
5454
},
55-
"eslintConfig": {
56-
"parserOptions": {
57-
"ecmaVersion": 8,
58-
"sourceType": "module"
59-
},
60-
"extends": [
61-
"google"
62-
],
63-
"env": {
64-
"es6": true,
65-
"browser": true,
66-
"serviceworker": true,
67-
"node": true
68-
},
69-
"rules": {
70-
"require-jsdoc": 0,
71-
"max-len": [
72-
"error",
73-
{
74-
"ignoreTemplateLiterals": true
75-
}
76-
]
77-
}
78-
},
7955
"stylelint": {
8056
"extends": "stylelint-config-standard",
8157
"rules": {

0 commit comments

Comments
 (0)