Skip to content

Commit dba4269

Browse files
steveseguinactions-user
authored andcommitted
fix: enhance overlay font-size handling (body + CSS vars) and fix docs table/code block overflow
[auto-enhanced]
1 parent 852fe26 commit dba4269

24 files changed

Lines changed: 187 additions & 101 deletions

docs/css/events.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ body {
5656
.field-table,
5757
.event-table {
5858
width: 100%;
59+
max-width: 100%;
60+
table-layout: fixed;
5961
border-collapse: collapse;
6062
margin: 1rem 0 1.5rem;
6163
font-size: 0.95rem;
@@ -76,6 +78,8 @@ body {
7678
padding: 0.85rem 1rem;
7779
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
7880
vertical-align: top;
81+
overflow-wrap: anywhere;
82+
word-break: normal;
7983
}
8084

8185
.field-table th,
@@ -97,6 +101,9 @@ body {
97101
padding: 0.15rem 0.35rem;
98102
border-radius: 6px;
99103
font-size: 0.92rem;
104+
white-space: normal;
105+
overflow-wrap: anywhere;
106+
word-break: break-word;
100107
}
101108

102109
.platform-card {

docs/css/styles.css

Lines changed: 40 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,22 @@ html.dark-mode {
7171
box-sizing: border-box;
7272
}
7373

74-
html {
75-
font-size: 62.5%; /* 10px = 1rem */
76-
scroll-behavior: smooth;
77-
}
78-
79-
body {
80-
font-family: var(--font-primary);
74+
html {
75+
font-size: 62.5%; /* 10px = 1rem */
76+
scroll-behavior: smooth;
77+
max-width: 100%;
78+
overflow-x: hidden;
79+
}
80+
81+
body {
82+
font-family: var(--font-primary);
8183
font-size: 1.6rem;
8284
line-height: 1.6;
83-
color: var(--text-primary);
84-
background-color: var(--background-light);
85-
overflow-x: hidden;
86-
}
85+
color: var(--text-primary);
86+
background-color: var(--background-light);
87+
max-width: 100%;
88+
overflow-x: hidden;
89+
}
8790

8891
a {
8992
text-decoration: none;
@@ -712,29 +715,33 @@ footer {
712715

713716
/* Code block generic styling */
714717

715-
.code-block {
716-
background-color: rgba(0, 0, 0, 0.25);
717-
border-radius: var(--radius-sm);
718-
padding: 1.5rem;
719-
margin: 1.5rem 0;
720-
font-family: var(--font-mono);
721-
font-size: 1.4rem;
722-
position: relative;
723-
}
724-
725-
.code-block-wrapper {
726-
display: flex;
727-
}
728-
729-
.code-block pre {
730-
margin: 0;
731-
font-family: var(--font-mono);
718+
.code-block {
719+
background-color: rgba(0, 0, 0, 0.25);
720+
border-radius: var(--radius-sm);
721+
padding: 1.5rem;
722+
margin: 1.5rem 0;
723+
font-family: var(--font-mono);
724+
font-size: 1.4rem;
725+
position: relative;
726+
max-width: 100%;
727+
}
728+
729+
.code-block-wrapper {
730+
display: flex;
731+
max-width: 100%;
732+
min-width: 0;
733+
}
734+
735+
.code-block pre {
736+
margin: 0;
737+
font-family: var(--font-mono);
732738
font-size: 1.4rem;
733-
line-height: 1.5;
734-
user-select: text;
735-
cursor: text;
736-
overflow-x: auto;
737-
}
739+
line-height: 1.5;
740+
user-select: text;
741+
cursor: text;
742+
max-width: 100%;
743+
overflow-x: auto;
744+
}
738745

739746
code {
740747
background-color: rgba(0, 0, 0, 0.25);

themes/LuckyLootTube/luckyloottube.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,12 @@
615615
}
616616
if (urlParams.has("font")) {
617617
const _fs = parseInt(urlParams.get("font"), 10);
618-
if (!isNaN(_fs) && _fs > 0) { document.documentElement.style.fontSize = _fs + "px"; }
618+
if (!isNaN(_fs) && _fs > 0) {
619+
document.documentElement.style.fontSize = _fs + "px";
620+
document.documentElement.style.setProperty("--msgSize", _fs + "px");
621+
document.documentElement.style.setProperty("--nameSize", Math.round(_fs * 1.4) + "px");
622+
document.body.style.fontSize = _fs + "px";
623+
}
619624
}
620625
if (urlParams.has("fontfamily")) {
621626
const _ff = (urlParams.get("fontfamily") || "").trim();

themes/Windows3.1/index.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,13 @@
210210
var _c = urlParams.get("chroma") || "";
211211
document.body.style.backgroundColor = _c.charAt(0) === "#" ? _c : "#" + _c;
212212
}
213-
if (urlParams.has("font")) {
214-
var _fs = parseInt(urlParams.get("font"), 10);
215-
if (!isNaN(_fs) && _fs > 0) { document.documentElement.style.fontSize = _fs + "px"; }
216-
}
213+
if (urlParams.has("font")) {
214+
var _fs = parseInt(urlParams.get("font"), 10);
215+
if (!isNaN(_fs) && _fs > 0) {
216+
document.documentElement.style.fontSize = _fs + "px";
217+
document.body.style.fontSize = _fs + "px";
218+
}
219+
}
217220
if (urlParams.has("fontfamily")) {
218221
var _ff = (urlParams.get("fontfamily") || "").trim();
219222
if (_ff) {

themes/compact-classic.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,10 @@
336336
}
337337
if (urlParams.has("font")) {
338338
var fs = parseInt(urlParams.get("font"), 10);
339-
if (!isNaN(fs) && fs > 0) { document.documentElement.style.fontSize = fs + "px"; }
339+
if (!isNaN(fs) && fs > 0) {
340+
document.documentElement.style.fontSize = fs + "px";
341+
document.body.style.fontSize = fs + "px";
342+
}
340343
}
341344
if (urlParams.has("fontfamily")) {
342345
var ff = (urlParams.get("fontfamily") || "").trim();

themes/compact-clean.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,10 @@
323323
}
324324
if (urlParams.has("font")) {
325325
var fs = parseInt(urlParams.get("font"), 10);
326-
if (!isNaN(fs) && fs > 0) { document.documentElement.style.fontSize = fs + "px"; }
326+
if (!isNaN(fs) && fs > 0) {
327+
document.documentElement.style.fontSize = fs + "px";
328+
document.body.style.fontSize = fs + "px";
329+
}
327330
}
328331
if (urlParams.has("fontfamily")) {
329332
var ff = (urlParams.get("fontfamily") || "").trim();

themes/compact-glass.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,10 @@
323323
}
324324
if (urlParams.has("font")) {
325325
var fs = parseInt(urlParams.get("font"), 10);
326-
if (!isNaN(fs) && fs > 0) { document.documentElement.style.fontSize = fs + "px"; }
326+
if (!isNaN(fs) && fs > 0) {
327+
document.documentElement.style.fontSize = fs + "px";
328+
document.body.style.fontSize = fs + "px";
329+
}
327330
}
328331
if (urlParams.has("fontfamily")) {
329332
var ff = (urlParams.get("fontfamily") || "").trim();

themes/deuks_overlay/overlay1.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,13 @@
177177
var _c = urlParams.get("chroma") || "";
178178
document.body.style.backgroundColor = _c.charAt(0) === "#" ? _c : "#" + _c;
179179
}
180-
if (urlParams.has("font")) {
181-
var _fs = parseInt(urlParams.get("font"), 10);
182-
if (!isNaN(_fs) && _fs > 0) { document.documentElement.style.fontSize = _fs + "px"; }
183-
}
180+
if (urlParams.has("font")) {
181+
var _fs = parseInt(urlParams.get("font"), 10);
182+
if (!isNaN(_fs) && _fs > 0) {
183+
document.documentElement.style.fontSize = _fs + "px";
184+
document.body.style.fontSize = _fs + "px";
185+
}
186+
}
184187
if (urlParams.has("fontfamily")) {
185188
var _ff = (urlParams.get("fontfamily") || "").trim();
186189
if (_ff) {

themes/deuks_overlay/overlay2.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,13 @@
207207
var _c = urlParams.get("chroma") || "";
208208
document.body.style.backgroundColor = _c.charAt(0) === "#" ? _c : "#" + _c;
209209
}
210-
if (urlParams.has("font")) {
211-
var _fs = parseInt(urlParams.get("font"), 10);
212-
if (!isNaN(_fs) && _fs > 0) { document.documentElement.style.fontSize = _fs + "px"; }
213-
}
210+
if (urlParams.has("font")) {
211+
var _fs = parseInt(urlParams.get("font"), 10);
212+
if (!isNaN(_fs) && _fs > 0) {
213+
document.documentElement.style.fontSize = _fs + "px";
214+
document.body.style.fontSize = _fs + "px";
215+
}
216+
}
214217
if (urlParams.has("fontfamily")) {
215218
var _ff = (urlParams.get("fontfamily") || "").trim();
216219
if (_ff) {

themes/horizontal.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,13 @@
318318
var _c = urlParams.get("chroma") || "";
319319
document.body.style.backgroundColor = _c.charAt(0) === "#" ? _c : "#" + _c;
320320
}
321-
if (urlParams.has("font")) {
322-
var _fs = parseInt(urlParams.get("font"), 10);
323-
if (!isNaN(_fs) && _fs > 0) { document.documentElement.style.fontSize = _fs + "px"; }
324-
}
321+
if (urlParams.has("font")) {
322+
var _fs = parseInt(urlParams.get("font"), 10);
323+
if (!isNaN(_fs) && _fs > 0) {
324+
document.documentElement.style.fontSize = _fs + "px";
325+
document.body.style.fontSize = _fs + "px";
326+
}
327+
}
325328
if (urlParams.has("fontfamily")) {
326329
var _ff = (urlParams.get("fontfamily") || "").trim();
327330
if (_ff) {

0 commit comments

Comments
 (0)