astro-better-steps 0.1.0 → 0.1.1

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 (2) hide show
  1. package/package.json +1 -1
  2. package/style.css +38 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-better-steps",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Numbered step-by-step component for Astro",
5
5
  "type": "module",
6
6
  "exports": {
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
- }