Skip to content

Commit

Permalink
Revert font-size behavior for non-fancy modes
Browse files Browse the repository at this point in the history
  • Loading branch information
kimjammer committed Dec 27, 2024
1 parent 0e0230b commit ca4db4a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions src/plugins/synced-lyrics/renderer/renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ createEffect(() => {
root.style.setProperty('--lyrics-active-offset', '0');
break;
case 'scale':
root.style.setProperty('--lyrics-font-size', '1.4rem');
root.style.setProperty(
'--lyrics-font-size',
'clamp(1.4rem, 1.1vmax, 3rem)',
);
root.style.setProperty(
'--lyrics-line-height',
'var(--ytmusic-body-line-height)',
Expand All @@ -58,7 +61,10 @@ createEffect(() => {
root.style.setProperty('--lyrics-active-offset', '0');
break;
case 'offset':
root.style.setProperty('--lyrics-font-size', '1.4rem');
root.style.setProperty(
'--lyrics-font-size',
'clamp(1.4rem, 1.1vmax, 3rem)',
);
root.style.setProperty(
'--lyrics-line-height',
'var(--ytmusic-body-line-height)',
Expand All @@ -78,7 +84,10 @@ createEffect(() => {
root.style.setProperty('--lyrics-active-offset', '5%');
break;
case 'focus':
root.style.setProperty('--lyrics-font-size', '1.4rem');
root.style.setProperty(
'--lyrics-font-size',
'clamp(1.4rem, 1.1vmax, 3rem)',
);
root.style.setProperty(
'--lyrics-line-height',
'var(--ytmusic-body-line-height)',
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/synced-lyrics/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/* Typography */
--lyrics-font-family: Satoshi, Avenir, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell,
Open Sans, Helvetica Neue, sans-serif;
--lyrics-font-size: 1.4rem;
--lyrics-font-size: clamp(1.4rem, 1.1vmax, 3rem);
--lyrics-line-height: var(--ytmusic-body-line-height);
--lyrics-width: 100%;

Expand Down

0 comments on commit ca4db4a

Please sign in to comment.