mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-18 06:38:38 +01:00
feat(css): add comprehensive mobile responsive styles
Add extensive CSS media queries and overflow handling for proper mobile device display of generated documentation. Overflow Prevention: - Set `overflow-x: hidden` on body and main-content - Add `word-break: break-word` and `overflow-wrap: anywhere` to property names - Enable horizontal scrolling inside pre blocks and enum values - Ensure code elements break properly on narrow screens Mobile Layout Adjustments (148 lines): - Reduce padding throughout (main-content, definition, description, usages) - Smaller font sizes for headers, titles, and definition names - Adjust modal sizing: full width, 90vh max height, reduced padding - Compact nested schema containers (properties, array-items, variants) Search Results Mobile: - Flex-wrap enabled for search result items - Result path takes full width with word breaking - Reorder elements with CSS order property Typography Scaling: - Header h1: 1.25rem - Schema section h2: 1.25rem - Definition names: 1.1rem with word-break - Modal title: 1rem Component Spacing: - Reduced gap in property-header - Smaller margins on type badges and refs - Compact constraints display (flex-direction: column) - Reduced padding on nested-schema summaries
This commit is contained in:
1 parent
ff0088e293
commit
c46efde896
1 file changed
+148
@@ -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 */
|
||||
|
||||
Reference in new issue
Block a user