@gjsify/adwaita-web 0.64.3-next.260 → 0.64.3-next.263

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/adwaita-web",
3
- "version": "0.64.3-next.260",
3
+ "version": "0.64.3-next.263",
4
4
  "description": "Adwaita/Libadwaita web components for browser targets",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -58,14 +58,14 @@
58
58
  "@codemirror/language": "^6.12.4",
59
59
  "@codemirror/state": "^6.7.0",
60
60
  "@codemirror/view": "^6.43.4",
61
- "@gjsify/adwaita-core": "0.64.3-next.260",
62
- "@gjsify/adwaita-fonts": "0.64.3-next.260",
63
- "@gjsify/adwaita-icons": "0.64.3-next.260",
64
- "@gjsify/gtksource-core": "0.64.3-next.260",
61
+ "@gjsify/adwaita-core": "0.64.3-next.263",
62
+ "@gjsify/adwaita-fonts": "0.64.3-next.263",
63
+ "@gjsify/adwaita-icons": "0.64.3-next.263",
64
+ "@gjsify/gtksource-core": "0.64.3-next.263",
65
65
  "@lezer/highlight": "^1.2.3"
66
66
  },
67
67
  "peerDependencies": {
68
- "@gjsify/app-settings": "0.64.3-next.260"
68
+ "@gjsify/app-settings": "0.64.3-next.263"
69
69
  },
70
70
  "peerDependenciesMeta": {
71
71
  "@gjsify/app-settings": {
@@ -73,11 +73,11 @@
73
73
  }
74
74
  },
75
75
  "devDependencies": {
76
- "@gjsify/app-settings": "0.64.3-next.260",
77
- "@gjsify/blueprint": "0.64.3-next.260",
78
- "@gjsify/cli": "0.64.3-next.260",
79
- "@gjsify/unit": "0.64.3-next.260",
80
- "@gjsify/vite-plugin-blueprint": "0.64.3-next.260",
76
+ "@gjsify/app-settings": "0.64.3-next.263",
77
+ "@gjsify/blueprint": "0.64.3-next.263",
78
+ "@gjsify/cli": "0.64.3-next.263",
79
+ "@gjsify/unit": "0.64.3-next.263",
80
+ "@gjsify/vite-plugin-blueprint": "0.64.3-next.263",
81
81
  "sass": "^1.101.0",
82
82
  "typescript": "^6.0.3"
83
83
  },
@@ -115,5 +115,5 @@
115
115
  "url": "https://github.com/gjsify/gjsify/issues"
116
116
  },
117
117
  "homepage": "https://github.com/gjsify/gjsify/tree/main/packages/web/adwaita-web#readme",
118
- "gitHead": "886de21be840429ce043cdbf8195172530e230d4"
118
+ "gitHead": "0f5ca82aab25bf9df8d1e790d28483b1f90fe3a9"
119
119
  }
package/scss/_link.scss CHANGED
@@ -1,9 +1,12 @@
1
1
  // _link.scss — `link` and `button.link`, libadwaita's link treatment.
2
2
  //
3
- // UNSCOPED, because upstream's rule is on the node and the class together
4
- // (`_links.scss:1-2`) and both spellings have a reader: a `Gtk.Label` that is a link is
5
- // the `link` node, and a `Gtk.LinkButton` is `button.link`. `<gtk-link-button>` renders an
6
- // inner `<button class="adw-button link">`, so the class is what the selector needs.
3
+ // ONLY `button.link`, not a bare `.link`. Upstream's rule names the `link` NODE and
4
+ // `button.link` (`_links.scss:1-2`); the `link` node is the inner node of a `Gtk.Label`'s
5
+ // `<a>` markup, which no element here renders. The `.link` style CLASS on anything but a
6
+ // button is unstyled upstream: `AdwLinkRow` adds it to its row (adw-link-row.c:377), and
7
+ // no rule matches `row.link`, so its title stays in the row's own colour. A bare `.link`
8
+ // here painted the About dialog's link rows blue and underlined. `<gtk-link-button>`
9
+ // renders an inner `<button class="adw-button link">`, which the selector below reads.
7
10
  //
8
11
  // THE TWO COLOURS ARE THE PALETTE'S, not new tokens: `$link_color: var(--accent-color)`
9
12
  // and `$link_visited_color: color-mix(in srgb, var(--accent-color) 80%, var(--view-fg-color))`
@@ -23,6 +26,7 @@
23
26
  //
24
27
  // Reference: refs/libadwaita/src/stylesheet/widgets/_links.scss:1-49
25
28
  // Reference: refs/libadwaita/src/stylesheet/_colors.scss:265-266
29
+ // Reference: refs/libadwaita/src/adw-link-row.c:377 (the row's `.link` class)
26
30
  // Reference: refs/gtk/gtk/gtklinkbutton.c:380 (the `.link` style class), :646-672 (the
27
31
  // URI tooltip), :742-749 (the VISITED state flag)
28
32
  // Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
@@ -33,7 +37,6 @@ $link-color: var(--accent-color);
33
37
  $link-visited-color: color-mix(in srgb, var(--accent-color) 80%, var(--view-fg-color));
34
38
  $osd-link-color: color-mix(in srgb, var(--accent-bg-color) 50%, white);
35
39
 
36
- .link,
37
40
  .adw-button.link {
38
41
  color: $link-color;
39
42
  text-decoration: underline;
@@ -105,6 +105,20 @@ export const GtkLinkButtonTest = async () => {
105
105
  host.remove();
106
106
  });
107
107
 
108
+ await it('the link treatment is button.link only — a row with the .link class stays plain', () => {
109
+ // AdwLinkRow adds `.link` to its row (adw-link-row.c:377) and no upstream rule
110
+ // matches `row.link`; only the `link` node and `button.link` are styled.
111
+ const { el, host } = mount({ uri: 'https://example.org/a', label: 'Example' });
112
+ const row = document.createElement('div');
113
+ row.classList.add('link');
114
+ row.textContent = 'Row';
115
+ host.appendChild(row);
116
+ expect(getComputedStyle(el.button).textDecorationLine).toBe('underline');
117
+ expect(getComputedStyle(row).textDecorationLine).toBe('none');
118
+ expect(getComputedStyle(row).color).toBe(getComputedStyle(host).color);
119
+ host.remove();
120
+ });
121
+
108
122
  await it('keeps the link treatment through a re-render of the label', () => {
109
123
  const { el, host } = mount({ uri: 'https://example.org/a', label: 'Example', visited: '' });
110
124
  el.setAttribute('label', 'Other');