astro-better-steps 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE.md +7 -0
  2. package/package.json +18 -4
  3. package/style.css +38 -15
package/LICENSE.md ADDED
@@ -0,0 +1,7 @@
1
+ Copyright (c) 2026 Better Static Sites
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/package.json CHANGED
@@ -1,7 +1,23 @@
1
1
  {
2
2
  "name": "astro-better-steps",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Numbered step-by-step component for Astro",
5
+ "keywords": [
6
+ "astro",
7
+ "steps",
8
+ "numbered",
9
+ "tutorial"
10
+ ],
11
+ "license": "MIT",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/better-static-sites/better-static-sites.github.io.git",
15
+ "directory": "astro-better-steps"
16
+ },
17
+ "homepage": "https://better-static-sites.github.io",
18
+ "bugs": {
19
+ "url": "https://github.com/better-static-sites/better-static-sites.github.io/issues"
20
+ },
5
21
  "type": "module",
6
22
  "exports": {
7
23
  ".": "./index.js",
@@ -12,7 +28,5 @@
12
28
  "*.js",
13
29
  "*.astro",
14
30
  "*.css"
15
- ],
16
- "keywords": ["astro", "steps", "numbered", "tutorial"],
17
- "license": "MIT"
31
+ ]
18
32
  }
package/style.css CHANGED
@@ -1,8 +1,42 @@
1
1
  /*
2
2
  astro-better-steps/style.css
3
3
  Dark mode: .dark ancestor class (Tailwind darkMode: 'class' compatible).
4
+
5
+ CSS custom properties (set on the .steps-container element or any ancestor):
6
+
7
+ Light mode defaults (override under a regular selector):
8
+ --steps-circle-bg background fill of the number circle
9
+ --steps-circle-border border color of the number circle
10
+ --steps-circle-color number text color inside the circle
11
+ --steps-line-color connecting vertical line color
12
+
13
+ Dark mode defaults (override under a .dark selector):
14
+ same properties apply; the .dark .steps-container block sets them
4
15
  */
5
16
 
17
+ .steps-container {
18
+ --steps-circle-bg: #eef2ff;
19
+ --steps-circle-border: #c7d2fe;
20
+ --steps-circle-color: #1e1b4b;
21
+ --steps-line-color: #c7d2fe;
22
+ }
23
+
24
+ .dark .steps-container {
25
+ --steps-circle-bg: #312e81;
26
+ --steps-circle-border: #3730a3;
27
+ --steps-circle-color: #e0e7ff;
28
+ --steps-line-color: #3730a3;
29
+ /* prose typography plugins (e.g. @tailwindcss/typography) set --tw-prose-bold
30
+ to a near-black value; only .prose-invert flips it, not .dark. Override
31
+ here so bold text inside steps stays readable in dark mode. */
32
+ color: inherit;
33
+ }
34
+
35
+ .dark .steps-container strong,
36
+ .dark .steps-container b {
37
+ color: inherit;
38
+ }
39
+
6
40
  .steps-container ol {
7
41
  list-style: none;
8
42
  padding-left: 0;
@@ -30,9 +64,9 @@
30
64
  align-items: center;
31
65
  justify-content: center;
32
66
  border-radius: 9999px;
33
- border: 1px solid #c7d2fe;
34
- background-color: #eef2ff;
35
- color: #1e1b4b;
67
+ border: 1px solid var(--steps-circle-border);
68
+ background-color: var(--steps-circle-bg);
69
+ color: var(--steps-circle-color);
36
70
  font-size: 0.75rem;
37
71
  font-weight: 700;
38
72
  line-height: 1;
@@ -46,20 +80,9 @@
46
80
  left: 0.9375rem;
47
81
  top: 2.5rem;
48
82
  width: 1px;
49
- background-color: #c7d2fe;
83
+ background-color: var(--steps-line-color);
50
84
  }
51
85
 
52
86
  .steps-container ol > li:last-child::after {
53
87
  display: none;
54
88
  }
55
-
56
- /* dark mode */
57
- .dark .steps-container ol > li::before {
58
- border-color: #3730a3;
59
- background-color: #312e81;
60
- color: #e0e7ff;
61
- }
62
-
63
- .dark .steps-container ol > li::after {
64
- background-color: #3730a3;
65
- }