@braccato/core 1.12.1 → 1.12.2
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/dist/README.md +3 -0
- package/dist/styles/lyrics.css +6 -0
- package/dist/view.js +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -252,6 +252,9 @@ show at full strength from the start.
|
|
|
252
252
|
| `--blyrics-credits-opacity` | `0.2` | While the song plays. |
|
|
253
253
|
| `--blyrics-credits-focused-opacity` | `0.85` | Once the song has ended. |
|
|
254
254
|
|
|
255
|
+
The credits are a `p`, not a `div`, so rules a theme writes for the lines as `.blyrics-container > div`
|
|
256
|
+
(hover scaling, per-line opacity and blur) never reach them. Style them through `.blyrics-credits`.
|
|
257
|
+
|
|
255
258
|
The container carries `data-credits-focused` while the credits hold the focus. To hide them, a
|
|
256
259
|
stylesheet can set `.blyrics-credits { display: none; }`, which the scroll then ignores, or a theme can
|
|
257
260
|
declare `/* blyrics-hide-credits = true; */` so they are never built.
|
package/dist/README.md
CHANGED
|
@@ -252,6 +252,9 @@ show at full strength from the start.
|
|
|
252
252
|
| `--blyrics-credits-opacity` | `0.2` | While the song plays. |
|
|
253
253
|
| `--blyrics-credits-focused-opacity` | `0.85` | Once the song has ended. |
|
|
254
254
|
|
|
255
|
+
The credits are a `p`, not a `div`, so rules a theme writes for the lines as `.blyrics-container > div`
|
|
256
|
+
(hover scaling, per-line opacity and blur) never reach them. Style them through `.blyrics-credits`.
|
|
257
|
+
|
|
255
258
|
The container carries `data-credits-focused` while the credits hold the focus. To hide them, a
|
|
256
259
|
stylesheet can set `.blyrics-credits { display: none; }`, which the scroll then ignores, or a theme can
|
|
257
260
|
declare `/* blyrics-hide-credits = true; */` so they are never built.
|
package/dist/styles/lyrics.css
CHANGED
|
@@ -240,7 +240,12 @@
|
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
.blyrics-container > .blyrics-credits {
|
|
243
|
+
box-sizing: border-box;
|
|
243
244
|
cursor: default;
|
|
245
|
+
margin: 0;
|
|
246
|
+
padding: var(--blyrics-padding) 0.25em;
|
|
247
|
+
transform: scale(var(--blyrics-scale));
|
|
248
|
+
transform-origin: left center;
|
|
244
249
|
}
|
|
245
250
|
|
|
246
251
|
.blyrics-credits {
|
|
@@ -250,6 +255,7 @@
|
|
|
250
255
|
}
|
|
251
256
|
|
|
252
257
|
.blyrics-credits__text {
|
|
258
|
+
display: block;
|
|
253
259
|
font-size: var(--blyrics-credits-font-size);
|
|
254
260
|
}
|
|
255
261
|
|
package/dist/view.js
CHANGED
|
@@ -45,10 +45,11 @@ function formatSongwriters(names) {
|
|
|
45
45
|
return names.length > 1 ? `${names.slice(0, -1).join(", ")} & ${names.at(-1)}` : (names[0] ?? "");
|
|
46
46
|
}
|
|
47
47
|
function buildCredits(doc, songwriters) {
|
|
48
|
-
|
|
48
|
+
// Not a div: themes style the lines as `.blyrics-container > div`, and none of that is meant for the credits.
|
|
49
|
+
const credits = doc.createElement("p");
|
|
49
50
|
credits.className = CREDITS_CLASS;
|
|
50
51
|
// The smaller size lives on an inner block so the credits keep the lines' em, and with it their inset.
|
|
51
|
-
const text = doc.createElement("
|
|
52
|
+
const text = doc.createElement("span");
|
|
52
53
|
text.className = CREDITS_TEXT_CLASS;
|
|
53
54
|
const names = doc.createElement("span");
|
|
54
55
|
names.className = CREDITS_NAMES_CLASS;
|