@hearthsound/design 0.2.9 → 0.2.11
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/README.md +3 -0
- package/css/components/admin.css +15 -13
- package/css/components/library-mark.css +11 -5
- package/css/components/page-header.css +13 -0
- package/css/components/track.css +30 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,6 +52,9 @@ Components use BEM-like `hs-` classes:
|
|
|
52
52
|
- utilities: the type scale (`hs-display`, `hs-title-1` to `hs-title-4`, `hs-heading`,
|
|
53
53
|
`hs-body`, `hs-caption`), `hs-link`, `hs-visually-hidden` and `hs-icon`.
|
|
54
54
|
|
|
55
|
+
Card modifiers `hs-card--album` and `hs-card--playlist` mark the kind of card and carry no
|
|
56
|
+
rules of their own; `hs-card--artist` is the only card that changes layout.
|
|
57
|
+
|
|
55
58
|
State is expressed with real pseudo-classes and ARIA attributes, never helper classes:
|
|
56
59
|
`:hover`, `:focus-visible`, `:disabled`, `[aria-disabled="true"]`, `[aria-pressed="true"]`,
|
|
57
60
|
`[aria-selected="true"]`, `[aria-current]`, `[aria-busy="true"]`, `[aria-invalid="true"]`
|
package/css/components/admin.css
CHANGED
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
* import-root rows, the plugin permission list, the storage bar with its legend, and
|
|
6
6
|
* the acquisition row spacing.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* then no permission list shows before install. No CSS state is added for the switch.
|
|
8
|
+
* p24-r3: the permission list is shown in the 340 px Install confirmation before an
|
|
9
|
+
* install from an index, and in the review of an upgrade that asks for new permissions.
|
|
10
|
+
* `plugins.confirm_install` (Don't ask again) skips the confirmation.
|
|
12
11
|
*/
|
|
13
12
|
|
|
14
13
|
/* ------------------------------------------------------------------ */
|
|
@@ -111,39 +110,42 @@
|
|
|
111
110
|
}
|
|
112
111
|
|
|
113
112
|
.hs-permission-row {
|
|
114
|
-
display:
|
|
113
|
+
display: grid;
|
|
114
|
+
grid-template-columns: minmax(64px, max-content) minmax(0, 1fr) max-content;
|
|
115
115
|
align-items: center;
|
|
116
116
|
gap: 10px;
|
|
117
117
|
font-size: 13px;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
.hs-permission-row__scope {
|
|
121
|
-
flex: none;
|
|
122
|
-
min-width: 64px;
|
|
123
121
|
font: 12px var(--hs-font-mono);
|
|
124
122
|
color: var(--hs-fg);
|
|
125
123
|
}
|
|
126
124
|
|
|
127
125
|
.hs-permission-row__detail {
|
|
128
|
-
flex: 1;
|
|
129
126
|
min-width: 0;
|
|
130
127
|
color: var(--hs-fg-muted);
|
|
128
|
+
overflow-wrap: anywhere;
|
|
131
129
|
}
|
|
132
130
|
|
|
133
131
|
.hs-permission-row .hs-pill {
|
|
134
|
-
|
|
135
|
-
margin-left: auto;
|
|
132
|
+
justify-self: end;
|
|
136
133
|
}
|
|
137
134
|
|
|
138
135
|
@media (max-width: 720px) {
|
|
139
136
|
.hs-permission-row {
|
|
140
|
-
|
|
137
|
+
grid-template-columns: minmax(64px, max-content) minmax(0, 1fr);
|
|
141
138
|
row-gap: 2px;
|
|
142
139
|
}
|
|
143
140
|
|
|
144
141
|
.hs-permission-row__detail {
|
|
145
|
-
|
|
146
|
-
|
|
142
|
+
grid-column: 1 / -1;
|
|
143
|
+
grid-row: 2;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.hs-permission-row .hs-pill {
|
|
147
|
+
grid-column: 2;
|
|
148
|
+
grid-row: 1;
|
|
147
149
|
}
|
|
148
150
|
}
|
|
149
151
|
|
|
@@ -6,16 +6,22 @@
|
|
|
6
6
|
* name and the glyph says what it is. Items that are not in the library carry
|
|
7
7
|
* no mark at all.
|
|
8
8
|
*
|
|
9
|
-
* Two placements:
|
|
10
|
-
*
|
|
9
|
+
* Two placements: beside a track row's title, where it is small and muted so it
|
|
10
|
+
* reads as a detail of the title rather than as a column of its own, and as a
|
|
11
|
+
* badge on the bottom-left of an album card's cover.
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
14
|
.hs-library-mark {
|
|
14
|
-
--hs-icon-size: 16px;
|
|
15
15
|
display: inline-flex;
|
|
16
|
+
flex: none;
|
|
16
17
|
align-items: center;
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
color: var(--hs-fg-muted);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* `.hs-icon` declares its own size on the element, so the mark's size is set
|
|
22
|
+
* there too rather than inherited from the wrapper. */
|
|
23
|
+
.hs-library-mark .hs-icon {
|
|
24
|
+
--hs-icon-size: 11px;
|
|
19
25
|
}
|
|
20
26
|
|
|
21
27
|
/* Sits above the cover art and its play disc, and takes no pointer events: the
|
|
@@ -123,6 +123,19 @@
|
|
|
123
123
|
font-weight: 600;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
/* E-E-2: the album hero's artist is a link inside the by-line, in the line's own
|
|
127
|
+
* weight and tone; the underline appears on hover and keyboard focus only. */
|
|
128
|
+
.hs-hero__by-link {
|
|
129
|
+
color: inherit;
|
|
130
|
+
text-decoration: none;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.hs-hero__by-link:hover,
|
|
134
|
+
.hs-hero__by-link:focus-visible {
|
|
135
|
+
text-decoration: underline;
|
|
136
|
+
text-underline-offset: 2px;
|
|
137
|
+
}
|
|
138
|
+
|
|
126
139
|
.hs-hero__meta {
|
|
127
140
|
margin: 0;
|
|
128
141
|
color: var(--hs-fg-muted);
|
package/css/components/track.css
CHANGED
|
@@ -144,6 +144,19 @@
|
|
|
144
144
|
min-width: 0;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
/* The title and the library mark share one line: the title keeps the ellipsis
|
|
148
|
+
* and the mark stays visible beside it at every width. */
|
|
149
|
+
.hs-track-row__title-line {
|
|
150
|
+
display: flex;
|
|
151
|
+
align-items: center;
|
|
152
|
+
gap: 4px;
|
|
153
|
+
min-width: 0;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.hs-track-row__title-line .hs-track-row__title {
|
|
157
|
+
min-width: 0;
|
|
158
|
+
}
|
|
159
|
+
|
|
147
160
|
.hs-track-row__title,
|
|
148
161
|
.hs-track-row__artist,
|
|
149
162
|
.hs-track-row__album {
|
|
@@ -158,6 +171,23 @@
|
|
|
158
171
|
color: var(--hs-fg-muted);
|
|
159
172
|
}
|
|
160
173
|
|
|
174
|
+
/* E-E-2: an artist name inside a row is a link. The row's text is pointer-events:
|
|
175
|
+
* none so presses reach the covering play button, so the link takes presses back and
|
|
176
|
+
* lifts above that button; the underline appears on hover and keyboard focus only. */
|
|
177
|
+
.hs-track-row__link {
|
|
178
|
+
pointer-events: auto;
|
|
179
|
+
position: relative;
|
|
180
|
+
z-index: 1;
|
|
181
|
+
color: inherit;
|
|
182
|
+
text-decoration: none;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.hs-track-row__link:hover,
|
|
186
|
+
.hs-track-row__link:focus-visible {
|
|
187
|
+
text-decoration: underline;
|
|
188
|
+
text-underline-offset: 2px;
|
|
189
|
+
}
|
|
190
|
+
|
|
161
191
|
.hs-track-row__duration {
|
|
162
192
|
font-size: 13px;
|
|
163
193
|
font-variant-numeric: tabular-nums;
|