Template:NavCell/styles.css: Difference between revisions
Template page
More actions
No edit summary |
No edit summary |
||
| Line 9: | Line 9: | ||
} | } | ||
/* This wrapper must exist in your template: | |||
<div class="navcell-top"> | |||
<div class="navcell-desc">...</div> | |||
<div class="navcell-ui">...</div> | |||
</div> | |||
*/ | |||
.navcell-top { | |||
display: flex; | |||
flex-direction: column; | |||
align-items: center; | |||
gap: 10px; | |||
width: 100%; | |||
box-sizing: border-box; | |||
} | |||
/* Side by side when the screen is wide enough */ | |||
@media screen and (min-width: 560px) { | |||
.navcell-top { | |||
flex-direction: row; | |||
align-items: flex-start; | |||
justify-content: center; | |||
gap: 18px; | |||
padding: 0 10px; | |||
} | |||
.navcell-desc { | |||
flex: 1 1 420px; | |||
max-width: 560px; | |||
margin: 0; | |||
} | |||
.navcell-ui { | |||
flex: 0 0 auto; | |||
margin: 0; | |||
} | |||
} | |||
/* Description box must wrap, never scroll sideways */ | |||
.navcell-desc { | .navcell-desc { | ||
width: 94%; | width: 94%; | ||
max-width: 560px; | max-width: 560px; | ||
margin: | margin: 0; | ||
padding: 10px 14px; | padding: 10px 14px; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
| Line 24: | Line 62: | ||
} | } | ||
.navcell-desc * { | .navcell-desc * { | ||
max-width: 100% !important; | max-width: 100% !important; | ||
white-space: normal !important; | white-space: normal !important; | ||
overflow-wrap: anywhere !important; | overflow-wrap: anywhere !important; | ||
word-break: break-word !important; | word-break: break-word !important; | ||
overflow-x: hidden !important; | overflow-x: hidden !important; | ||
overflow-y: visible !important; | overflow-y: visible !important; | ||
} | } | ||
.navcell-desc pre, | .navcell-desc pre, | ||
.navcell-desc code, | .navcell-desc code, | ||
| Line 46: | Line 80: | ||
} | } | ||
.navcell-desc p, | .navcell-desc p, | ||
.navcell-desc div, | .navcell-desc div, | ||
| Line 55: | Line 88: | ||
.navcell-ui { | .navcell-ui { | ||
margin: | margin: 0; | ||
padding: 0; | padding: 0; | ||
} | } | ||
| Line 137: | Line 170: | ||
.nav-nearby * { | .nav-nearby * { | ||
max-width: 100% !important; | max-width: 100% !important; | ||
white-space: normal !important; | white-space: normal !important; | ||
overflow-wrap: anywhere !important; | overflow-wrap: anywhere !important; | ||
word-break: break-word !important; | word-break: break-word !important; | ||
overflow-x: hidden !important; | overflow-x: hidden !important; | ||
overflow-y: visible !important; | overflow-y: visible !important; | ||
} | } | ||
Revision as of 08:44, 20 December 2025
.navcell {
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
margin: 0.4em 0;
max-width: 100%;
box-sizing: border-box;
}
/* This wrapper must exist in your template:
<div class="navcell-top">
<div class="navcell-desc">...</div>
<div class="navcell-ui">...</div>
</div>
*/
.navcell-top {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
width: 100%;
box-sizing: border-box;
}
/* Side by side when the screen is wide enough */
@media screen and (min-width: 560px) {
.navcell-top {
flex-direction: row;
align-items: flex-start;
justify-content: center;
gap: 18px;
padding: 0 10px;
}
.navcell-desc {
flex: 1 1 420px;
max-width: 560px;
margin: 0;
}
.navcell-ui {
flex: 0 0 auto;
margin: 0;
}
}
/* Description box must wrap, never scroll sideways */
.navcell-desc {
width: 94%;
max-width: 560px;
margin: 0;
padding: 10px 14px;
box-sizing: border-box;
overflow-x: hidden !important;
overflow-y: visible !important;
white-space: normal !important;
overflow-wrap: anywhere !important;
word-break: break-word !important;
}
.navcell-desc * {
max-width: 100% !important;
white-space: normal !important;
overflow-wrap: anywhere !important;
word-break: break-word !important;
overflow-x: hidden !important;
overflow-y: visible !important;
}
.navcell-desc pre,
.navcell-desc code,
.navcell-desc tt {
white-space: normal !important;
overflow-wrap: anywhere !important;
word-break: break-word !important;
overflow: hidden !important;
}
.navcell-desc p,
.navcell-desc div,
.navcell-desc span {
margin: 0 !important;
padding: 0 !important;
}
.navcell-ui {
margin: 0;
padding: 0;
}
.nav-grid {
display: grid;
grid-template-columns: 40px 40px 40px;
grid-template-rows: 40px 40px 40px;
gap: 4px;
justify-content: center;
margin: 0;
padding: 0;
}
.nav-btn {
display: flex;
align-items: center;
justify-content: center;
background: #222;
border: 1px solid #444;
border-radius: 7px;
color: #eee;
font-size: 0.72em;
line-height: 1.05em;
text-align: center;
box-sizing: border-box;
}
.nav-btn a {
color: inherit;
text-decoration: none;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.nav-btn:hover {
background: #333;
border-color: #777;
}
.nav-empty,
.nav-center {
background: transparent;
border: none;
}
.nav-vertical-row {
display: flex;
justify-content: center;
gap: 6px;
margin: 2px 0 2px 0;
padding: 0;
}
.nav-vertical {
min-width: 68px;
padding: 4px 6px;
font-size: 0.7em;
}
.nav-nearby {
width: 94%;
max-width: 560px;
margin: 2px 0 0 0;
padding: 8px 12px;
text-align: center;
opacity: 0.9;
box-sizing: border-box;
overflow-x: hidden !important;
overflow-y: visible !important;
white-space: normal !important;
overflow-wrap: anywhere !important;
word-break: break-word !important;
}
.nav-nearby * {
max-width: 100% !important;
white-space: normal !important;
overflow-wrap: anywhere !important;
word-break: break-word !important;
overflow-x: hidden !important;
overflow-y: visible !important;
}