@toheeb/base 1.6.0 → 1.7.0

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.
package/base-settings.js CHANGED
@@ -86,7 +86,7 @@ class BaseSettings extends HTMLElement {
86
86
  </main>
87
87
  </dialog>
88
88
  <style>
89
- ._bs {
89
+ :where(._bs) {
90
90
  box-shadow:
91
91
  -0px -0px 1px oklch(from currentColor l c h / .01),
92
92
  -2px -2px 3px oklch(from currentColor l c h / .03),
@@ -105,7 +105,7 @@ class BaseSettings extends HTMLElement {
105
105
  (color: oklch(0 0 0)) and
106
106
  (color: light-dark(#000, #fff))
107
107
  {
108
- ._bs {
108
+ :where(._bs) {
109
109
  background-color: light-dark(
110
110
  oklch(1 0.003 var(--base-color-hue)),
111
111
  oklch(0.22 .03 var(--base-color-hue))
@@ -113,11 +113,11 @@ class BaseSettings extends HTMLElement {
113
113
  }
114
114
  }
115
115
 
116
- dialog::backdrop {
116
+ :where(dialog::backdrop) {
117
117
  background: transparent;
118
118
  }
119
119
 
120
- ._bs button[type=submit] {
120
+ :where(._bs button[type=submit]) {
121
121
  display: flex;
122
122
  justify-content: center;
123
123
  align-items: center;
@@ -126,13 +126,13 @@ class BaseSettings extends HTMLElement {
126
126
  padding: .25em;
127
127
  }
128
128
 
129
- ._bs form {
129
+ :where(._bs form) {
130
130
  display: grid;
131
131
  width: 100%;
132
132
  gap: calc(.5 * var(--bbg));
133
133
  }
134
134
 
135
- ._bs p {
135
+ :where(._bs p) {
136
136
  width: 100%;
137
137
  display: flex;
138
138
  flex-flow: row wrap;
@@ -140,22 +140,22 @@ class BaseSettings extends HTMLElement {
140
140
  gap: calc(.25 * var(--bbg)) calc(.75 * var(--bbg));
141
141
  }
142
142
 
143
- ._bs .modes {
143
+ :where(._bs .modes) {
144
144
  margin-top: var(--bbg);
145
145
  }
146
146
 
147
- ._bs .fields label:not([hidden]) {
147
+ :where(._bs .fields label:not([hidden])) {
148
148
  display: grid;
149
149
  gap: .25em;
150
150
  flex: 1 1 calc(50% - calc(.75 * var(--bbg)));
151
151
  }
152
152
 
153
- ._bs .fields span {
153
+ :where(._bs .fields span) {
154
154
  font-size: calc(var(--bfs-075) * 1rem);
155
155
  }
156
156
 
157
- ._bs .fields input,
158
- ._bs .fields select
157
+ :where(._bs .fields input),
158
+ :where(._bs .fields select)
159
159
  {
160
160
  width: 100%;
161
161
  }
package/base.css CHANGED
@@ -286,45 +286,69 @@ h1, h2, h3, h4, h5, h6 {
286
286
  margin-block: 0;
287
287
  }
288
288
 
289
- :is(section, aside, nav, article)
290
- :is(section, aside, nav, article)
291
- :is(section, aside, nav, article)
292
- :is(section, aside, nav, article)
293
- :is(section, aside, nav, article)
294
- :is(section, aside, nav, article) {
295
- margin-block: var(--bbg-300) 0;
289
+
290
+ /* Landmarks */
291
+ :where(body > div > *) {
292
+ margin: var(--bbg-300) 0;
296
293
  }
297
294
 
298
- :is(section, aside, nav, article)
299
- :is(section, aside, nav, article)
300
- :is(section, aside, nav, article)
301
- :is(section, aside, nav, article)
302
- :is(section, aside, nav, article) {
303
- margin-block: var(--bbg-400) 0;
295
+ /* sections */
296
+
297
+ :where(main section) {
298
+ margin-block: var(--bbg-800);
304
299
  }
305
300
 
306
- :is(section, aside, nav, article)
307
- :is(section, aside, nav, article)
308
- :is(section, aside, nav, article)
309
- :is(section, aside, nav, article) {
310
- margin-block: var(--bbg-500) 0;
301
+ :where(
302
+ main
303
+ section
304
+ :is(section, article, nav, aside)
305
+ ) {
306
+ margin-block: var(--bbg-700) 0;
311
307
  }
312
308
 
313
- :is(section, aside, nav, article)
314
- :is(section, aside, nav, article)
315
- :is(section, aside, nav, article) {
309
+ :where(
310
+ main
311
+ section
312
+ :is(section, article, nav, aside)
313
+ :is(section, article, nav, aside)
314
+ ) {
316
315
  margin-block: var(--bbg-600) 0;
317
316
  }
318
317
 
319
- :is(section, aside, nav, article)
320
- :is(section, aside, nav, article) {
321
- margin-block: var(--bbg-700) 0;
318
+ :where(
319
+ main
320
+ section
321
+ :is(section, article, nav, aside)
322
+ :is(section, article, nav, aside)
323
+ :is(section, article, nav, aside)
324
+ ) {
325
+ margin-block: var(--bbg-500) 0;
322
326
  }
323
327
 
324
- :is(section, aside, nav, article) {
325
- margin-block: var(--bbg-800);
328
+ :where(
329
+ main
330
+ section
331
+ :is(section, article, nav, aside)
332
+ :is(section, article, nav, aside)
333
+ :is(section, article, nav, aside)
334
+ :is(section, article, nav, aside)
335
+ ) {
336
+ margin-block: var(--bbg-400) 0;
337
+ }
338
+
339
+ :where(
340
+ main
341
+ section
342
+ :is(section, article, nav, aside)
343
+ :is(section, article, nav, aside)
344
+ :is(section, article, nav, aside)
345
+ :is(section, article, nav, aside)
346
+ :is(section, article, nav, aside)
347
+ ) {
348
+ margin-block: var(--bbg-300) 0;
326
349
  }
327
350
 
351
+
328
352
  /* 6 */
329
353
  p + p {
330
354
  text-indent: calc(var(--base-mode-indent) * 1em);
@@ -405,6 +429,7 @@ main, td, caption {
405
429
 
406
430
  :where(a[href]:not(:has(p, pre, details, fieldset, table, dl))):hover {
407
431
  text-decoration: underline;
432
+ text-decoration-thickness: 1px;
408
433
  }
409
434
 
410
435
  :where(a[href]:not(:has(p, pre, details, fieldset, table, dl)))::after {
@@ -869,3 +894,8 @@ select,
869
894
  margin-block-start: calc(1.7 * var(--bbg))
870
895
  }
871
896
 
897
+
898
+ summary {
899
+ font-weight: bold;
900
+ list-style-position: outside;
901
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toheeb/base",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "A classless stylesheet for Personalizable Web Design",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/base.html DELETED
@@ -1,248 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta charset="UTF-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>Document</title>
8
- <link rel="stylesheet" href="./base.css" title="Base">
9
- <meta name="color-scheme" content="darks slight">
10
- <script src="./base-settings.js"></script>
11
- <style>
12
- :root {
13
- /* --base-font-family-toggle: 0;
14
- --base-font-scale-toggle: 0;
15
- --base-font-size-toggle: 0;
16
- --base-line-length-toggle: 0;
17
- --base-line-height-toggle: 0;
18
- --base-block-gap-toggle: 0; */
19
- }
20
- </style>
21
- </head>
22
-
23
- <body>
24
- <main>
25
- <header>
26
- <p>Site Header, <button class="base-settings">Personalization Settings</button></p>
27
- </header>
28
- <section>
29
- <header>
30
- <p>Section Header</p>
31
- </header>
32
- <hgroup>
33
- <p>kicker one</p>
34
- <p>kicker two</p>
35
- <h1>Heading Level One (H1)</h1>
36
- <p>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
37
- <p>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
38
- </hgroup>
39
- <div>
40
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
41
- <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
42
- <p>
43
- <label for="">
44
- Select
45
- <select name="" id="">
46
- <option value="">Onge</option>
47
- <option value="">Two</option>
48
- <option value="">Three</option>
49
- <option value="">Four</option>
50
- </select>
51
- </label>
52
- <input type="number"> </p>
53
- <p>
54
- <input type="text" name="" id="" list="dd">
55
- <datalist id="dd">
56
- <option value="hh">Hello</option>
57
- </datalist>
58
-
59
- <input type="color" name="" id="">
60
- <input type="checkbox" name="" id="">
61
- <input type="radio" name="" id="">
62
- Hello
63
- <input type="range" name="" id="">
64
- <textarea name="" id="" cols="30" rows="10"></textarea>
65
- </p>
66
-
67
- <pre>
68
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
69
- </pre>
70
- <figure>
71
- <figcaption>
72
- <p>Some caption</p>
73
- </figcaption>
74
- <p>Figure: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
75
- </figure>
76
- <figure>
77
- <p>Figure: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
78
- <figcaption>
79
- <p>Some caption</p>
80
- </figcaption>
81
- </figure>
82
- <table>
83
- <caption>
84
- <p>Hello Caption</p>
85
- </caption>
86
- <thead>
87
- <tr>
88
- <th>One</th>
89
- <th>Two</th>
90
- </tr>
91
- </thead>
92
- <tbody>
93
- <tr>
94
- <td>
95
- <p>Text</p>
96
- </td>
97
- <td>
98
- <p>Text</p>
99
- </td>
100
- </tr>
101
- </tbody>
102
- </table>
103
- <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
104
- <ol>
105
- <li>
106
- <p>Hello</p>
107
- </li>
108
- <li>
109
- <p>Hello</p>
110
- <ol>
111
- <li>
112
- <p>World</p>
113
- </li>
114
- </ol>
115
- </li>
116
- <li>
117
- <p>Hello</p>
118
- </li>
119
- </ol>
120
- <p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
121
- <dl>
122
- <div>
123
- <dt>Term one</dt>
124
- <dt>Term two</dt>
125
- <dd>
126
- <p>Hello World</p>
127
- <dl>
128
- <div>
129
- <dt>Term one</dt>
130
- <dt>Term two</dt>
131
- <dd>
132
- <p>Hello World</p>
133
-
134
- </dd>
135
- </div>
136
- <div>
137
- <dt>Term one</dt>
138
- <dt>Term two</dt>
139
- <dd>
140
- <p>Hello World</p>
141
- </dd>
142
- </div>
143
- </dl>
144
- </dd>
145
- </div>
146
- <div>
147
- <dt>Term one</dt>
148
- <dt>Term two</dt>
149
- <dd>
150
- <p>Hello World</p>
151
- </dd>
152
- </div>
153
- </dl>
154
- <p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
155
- <details>
156
- <summary>Hello World</summary>
157
- <p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
158
- </details>
159
- <p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
160
- <!-- <fieldset>
161
- <legend>Legend</legend>
162
- <p>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
163
- </fieldset> -->
164
- <address>
165
- <p>Excepteur del occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
166
- </address>
167
- <blockquote>
168
- <p>Excepteur del occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
169
- </blockquote>
170
- <ins>
171
- <p>Excepteur <a href="">sint</a> occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
172
- </ins>
173
- <a href="hg">
174
- <p>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
175
- </a>
176
- <del>
177
- <p>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
178
- </del>
179
- <fieldset>
180
- <legend>Hello</legend>
181
-
182
- <p>Hello world</p>
183
- </fieldset>
184
- <p>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
185
- <hr>
186
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
187
- <p>Lorem <img src="./bd-1.png" alt=""> <img src="./bd-1.png" alt=""> ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
188
- <p>Lorem <audio src="./dull.mp3" controls></audio> ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
189
- </div>
190
- <footer>
191
- <p>Section Footer</p>
192
- </footer>
193
- </section>
194
- <footer>
195
- <p>Footer Landmark</p>
196
- </footer>
197
-
198
- <section>
199
- <hgroup>
200
- <h1>H1</h1>
201
- </hgroup>
202
- <div>
203
- <section>
204
- <hgroup>
205
- <h2>H2</h2>
206
- </hgroup>
207
- <div>
208
- <section>
209
- <hgroup>
210
- <h3>H3</h3>
211
- </hgroup>
212
- <div>
213
- <section>
214
- <hgroup>
215
- <h4>H4</h4>
216
- </hgroup>
217
- <div>
218
- <section>
219
- <hgroup>
220
- <h5>H5</h5>
221
- </hgroup>
222
- <div>
223
- <section>
224
- <hgroup>
225
- <h6>H6</h6>
226
- <p>SH</p>
227
- </hgroup>
228
- <div>
229
- <p>PP</p>
230
- <p><small>SM</small></p>
231
- </div>
232
- </section>
233
- </div>
234
- </section>
235
- </div>
236
- </section>
237
- </div>
238
- </section>
239
- </div>
240
- </section>
241
- </div>
242
- </section>
243
- </main>
244
- <base-settings></base-settings>
245
- </body>
246
-
247
- </html>
248
-