@gjsify/adwaita-web 0.64.3-next.260 → 0.64.3-next.262
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/dist/adwaita-web.css +2 -16
- package/dist/adwaita-web.css.map +1 -1
- package/lib/types/styles.generated.d.ts +1 -1
- package/package.json +12 -12
- package/scss/_link.scss +8 -5
- package/src/gtk-link-button.spec.ts +14 -0
- package/src/styles.generated.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/adwaita-web",
|
|
3
|
-
"version": "0.64.3-next.
|
|
3
|
+
"version": "0.64.3-next.262",
|
|
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.
|
|
62
|
-
"@gjsify/adwaita-fonts": "0.64.3-next.
|
|
63
|
-
"@gjsify/adwaita-icons": "0.64.3-next.
|
|
64
|
-
"@gjsify/gtksource-core": "0.64.3-next.
|
|
61
|
+
"@gjsify/adwaita-core": "0.64.3-next.262",
|
|
62
|
+
"@gjsify/adwaita-fonts": "0.64.3-next.262",
|
|
63
|
+
"@gjsify/adwaita-icons": "0.64.3-next.262",
|
|
64
|
+
"@gjsify/gtksource-core": "0.64.3-next.262",
|
|
65
65
|
"@lezer/highlight": "^1.2.3"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"@gjsify/app-settings": "0.64.3-next.
|
|
68
|
+
"@gjsify/app-settings": "0.64.3-next.262"
|
|
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.
|
|
77
|
-
"@gjsify/blueprint": "0.64.3-next.
|
|
78
|
-
"@gjsify/cli": "0.64.3-next.
|
|
79
|
-
"@gjsify/unit": "0.64.3-next.
|
|
80
|
-
"@gjsify/vite-plugin-blueprint": "0.64.3-next.
|
|
76
|
+
"@gjsify/app-settings": "0.64.3-next.262",
|
|
77
|
+
"@gjsify/blueprint": "0.64.3-next.262",
|
|
78
|
+
"@gjsify/cli": "0.64.3-next.262",
|
|
79
|
+
"@gjsify/unit": "0.64.3-next.262",
|
|
80
|
+
"@gjsify/vite-plugin-blueprint": "0.64.3-next.262",
|
|
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": "
|
|
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
|
-
//
|
|
4
|
-
// (`_links.scss:1-2`)
|
|
5
|
-
//
|
|
6
|
-
//
|
|
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');
|