@toheeb/base 1.4.3 → 1.5.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.
package/base-settings.js CHANGED
@@ -158,7 +158,7 @@ class BaseSettings extends HTMLElement {
158
158
  `;
159
159
 
160
160
  document.addEventListener("click", e => {
161
- if (e.target.classList.contains("base-settings")) {
161
+ if (e.target.closest(".base-settings")) {
162
162
  this.querySelector("dialog").showModal();
163
163
  }
164
164
  })
@@ -337,20 +337,25 @@ class BaseSettings extends HTMLElement {
337
337
 
338
338
  // Color Scheme
339
339
  {
340
- const color_scheme = document.querySelector("meta[name=color-scheme]")?.content.split(" ");
341
- const node_color_scheme = this.querySelector("#base-color-scheme");
342
- const has_light = color_scheme.includes("light");
343
- const has_dark = color_scheme.includes("dark");
344
-
345
- if (has_light && has_dark) {
346
- node_color_scheme.value = "";
347
- } else if (has_light) {
348
- node_color_scheme.value = "light";
349
- } else if (has_dark) {
350
- node_color_scheme.value = "dark";
340
+ const color_scheme = document.querySelector("meta[name=color-scheme]");
341
+ const label_color_scheme = this.querySelector("#base-color-scheme").closest("label");
342
+
343
+ if (color_scheme) {
344
+ const content = color_scheme.content.split(" ");
345
+ const node_color_scheme = this.querySelector("#base-color-scheme");
346
+ const has_light = content.includes("light");
347
+ const has_dark = content.includes("dark");
348
+
349
+ if (has_light && has_dark) {
350
+ node_color_scheme.value = "";
351
+ label_color_scheme.hidden = false;
352
+ } else {
353
+ label_color_scheme.hidden = true;
354
+ }
351
355
  } else {
352
- node_color_scheme.value = "";
356
+ label_color_scheme.hidden = true;
353
357
  }
358
+
354
359
  }
355
360
  }
356
361
 
package/base.css CHANGED
@@ -398,8 +398,19 @@ main, td, caption {
398
398
  }
399
399
 
400
400
 
401
- :where(a[href]:not(:has(p, pre, details, fieldset, table, dl)) + a[href]:not(:has(p, pre, details, fieldset, table, dl))) {
402
- margin-inline-start: 1em;
401
+ :where(a[href]:not(:has(p, pre, details, fieldset, table, dl))) {
402
+ text-decoration: none;
403
+ }
404
+
405
+ :where(a[href]:not(:has(p, pre, details, fieldset, table, dl))):hover {
406
+ text-decoration: underline;
407
+ }
408
+
409
+ :where(a[href]:not(:has(p, pre, details, fieldset, table, dl)))::after {
410
+ content: "\000bb";
411
+ vertical-align: top;
412
+ line-height: 1;
413
+ padding: 0 .1em;
403
414
  }
404
415
 
405
416
 
package/base.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
7
  <title>Document</title>
8
8
  <link rel="stylesheet" href="./base.css">
9
- <meta name="color-scheme" content="darks light">
9
+ <meta name="color-scheme" content="darks slight">
10
10
  <script src="./base-settings.js"></script>
11
11
  </head>
12
12
 
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
- {
2
- "name": "@toheeb/base",
3
- "version": "1.4.3",
4
- "description": "A classless stylesheet for Personalizable Web Design",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
- },
9
- "keywords": ["css"],
10
- "author": "2",
11
- "license": "AGPL-3.0-or-later"
12
- }
1
+ {
2
+ "name": "@toheeb/base",
3
+ "version": "1.5.1",
4
+ "description": "A classless stylesheet for Personalizable Web Design",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": ["css"],
10
+ "author": "2",
11
+ "license": "AGPL-3.0-or-later"
12
+ }