diff --git a/src/templates/style.css b/src/templates/style.css index b1485401..b7e2fc6a 100644 --- a/src/templates/style.css +++ b/src/templates/style.css @@ -788,6 +788,154 @@ body { .depth-5 { margin-left: 0; } + + /* Prevent horizontal scroll on body */ + body { + overflow-x: hidden; + } + + /* Main content overflow protection */ + .main-content { + overflow-x: hidden; + padding: 1rem; + max-width: 100%; + } + + /* Property name word breaking */ + .property-name { + word-break: break-word; + overflow-wrap: anywhere; + } + + /* Ensure property header wraps properly */ + .property-header { + gap: 0.25rem 0.5rem; + } + + /* Inline code breaking */ + code { + word-break: break-word; + overflow-wrap: anywhere; + } + + /* Pre blocks scroll horizontally inside their container */ + .description pre { + overflow-x: auto; + max-width: 100%; + } + + /* Usage list code paths */ + .usage-list code { + word-break: break-all; + display: inline-block; + max-width: 100%; + } + + /* Enum values - horizontal scroll inside container */ + .enum-values { + overflow-x: auto; + max-width: 100%; + -webkit-overflow-scrolling: touch; + } + + .enum-values code { + word-break: break-word; + max-width: 100%; + } + + /* Type badges and refs - allow wrapping */ + .type-badge, + .type-ref { + margin-top: 0.25rem; + } + + /* Modal for mobile */ + .modal-overlay { + padding: 0.5rem; + } + + .modal { + max-width: 100%; + max-height: 90vh; + } + + .modal-header { + padding: 0.75rem 1rem; + } + + .modal-content { + padding: 1rem; + } + + .modal-title { + font-size: 1rem; + } + + /* Nested schema containers - reduce padding */ + .properties-container, + .array-items, + .tuple-items, + .variants { + padding: 0.5rem; + } + + .nested-schema > summary { + padding: 0.5rem; + } + + /* Search results on mobile */ + .search-result-item { + flex-wrap: wrap; + } + + .result-path { + width: 100%; + word-break: break-word; + overflow-wrap: anywhere; + order: 3; + margin-top: 0.25rem; + } + + .result-type { + order: 2; + } + + /* Description blocks */ + .description { + padding: 0.5rem 0.75rem; + } + + /* Constraints display */ + .constraints { + flex-direction: column; + gap: 0.25rem; + } + + /* Usages section */ + .usages { + padding: 0.5rem 0.75rem; + } + + /* Definition padding */ + .definition { + padding: 1rem; + } + + /* Header title sizing */ + .header h1 { + font-size: 1.25rem; + } + + /* Schema section titles */ + .schema-section > h2 { + font-size: 1.25rem; + } + + /* Definition name sizing */ + .definition-name { + font-size: 1.1rem; + word-break: break-word; + } } /* Variants */