Template:NavCell/styles.css: Difference between revisions
Template page
More actions
No edit summary |
No edit summary |
||
| Line 3: | Line 3: | ||
flex-direction: column; | flex-direction: column; | ||
align-items: center; | align-items: center; | ||
gap: | gap: 6px; | ||
margin: 0. | margin: 0.2em 0; | ||
max-width: 100%; | max-width: 100%; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
} | } | ||
/* | /* Layout: left stack (desc + nearby) with dpad on the right when there is room */ | ||
*/ | |||
.navcell-top { | .navcell-top { | ||
display: flex; | display: flex; | ||
flex-direction: column; | flex-direction: column; | ||
align-items: center; | align-items: center; | ||
gap: | gap: 6px; | ||
width: 100%; | width: 100%; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
} | } | ||
.navcell-left { | |||
width: 100%; | |||
max-width: 640px; | |||
box-sizing: border-box; | |||
} | } | ||
/* | /* Compact, MUD like text block */ | ||
.navcell-desc { | .navcell-desc { | ||
width: 94%; | width: 94%; | ||
max-width: | max-width: 640px; | ||
margin: 0; | margin: 0; | ||
padding: | padding: 0; | ||
background: transparent; | |||
border: none; | |||
border-radius: 0; | |||
font-size: 0.92em; | |||
line-height: 1.15; | |||
letter-spacing: 0; | |||
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-y: visible !important; | |||
} | } | ||
| Line 71: | Line 56: | ||
} | } | ||
.navcell-desc | .navcell-desc p, | ||
.navcell-desc | .navcell-desc div { | ||
. | margin: 0 !important; | ||
padding: 0 !important; | |||
} | |||
/* Nearby directly under description, also compact */ | |||
.nav-nearby { | |||
width: 94%; | |||
max-width: 640px; | |||
margin: 6px 0 0 0; | |||
padding: 0; | |||
background: transparent; | |||
border: none; | |||
border-radius: 0; | |||
font-size: 0.88em; | |||
line-height: 1.15; | |||
opacity: 0.95; | |||
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: hidden !important; | overflow-x: hidden !important; | ||
overflow-y: visible !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; | |||
} | } | ||
.navcell-ui { | .navcell-ui { | ||
margin: 0; | margin: 4px 0 0 0; | ||
padding: 0; | padding: 0; | ||
} | } | ||
/* D pad */ | |||
.nav-grid { | .nav-grid { | ||
display: grid; | display: grid; | ||
| Line 137: | Line 144: | ||
} | } | ||
/* Up and down should be a bit more separated than before */ | |||
.nav-vertical-row { | .nav-vertical-row { | ||
display: flex; | display: flex; | ||
justify-content: center; | justify-content: center; | ||
gap: | gap: 10px; | ||
margin: | margin: 10px 0 0 0; | ||
padding: 0; | padding: 0; | ||
} | } | ||
.nav-vertical { | .nav-vertical { | ||
min-width: | min-width: 70px; | ||
padding: | padding: 6px 8px; | ||
font-size: 0.7em; | font-size: 0.7em; | ||
} | } | ||
/* Put dpad to the right of (desc + nearby) when the screen can handle it */ | |||
@media screen and (min-width: 620px) { | |||
.navcell-top { | |||
flex-direction: row; | |||
align-items: flex-start; | |||
justify-content: center; | |||
gap: 18px; | |||
padding: 0 10px; | |||
} | |||
.navcell-left { | |||
width: auto; | |||
max-width: 640px; | |||
} | |||
.navcell-ui { | |||
margin: 0; | |||
} | |||
.navcell-desc, | |||
.nav-nearby { | |||
width: 100%; | |||
max-width: 640px; | |||
} | |||
} | } | ||
/* If the phone is short, tighten vertical spacing further */ | |||
@media screen and (max-height: 740px) { | |||
.navcell { | |||
gap: 4px; | |||
} | |||
.navcell-ui { | |||
margin-top: 2px; | |||
} | |||
.nav-vertical-row { | |||
margin-top: 8px; | |||
} | |||
} | } | ||
Revision as of 08:52, 20 December 2025
.navcell {
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
margin: 0.2em 0;
max-width: 100%;
box-sizing: border-box;
}
/* Layout: left stack (desc + nearby) with dpad on the right when there is room */
.navcell-top {
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
width: 100%;
box-sizing: border-box;
}
.navcell-left {
width: 100%;
max-width: 640px;
box-sizing: border-box;
}
/* Compact, MUD like text block */
.navcell-desc {
width: 94%;
max-width: 640px;
margin: 0;
padding: 0;
background: transparent;
border: none;
border-radius: 0;
font-size: 0.92em;
line-height: 1.15;
letter-spacing: 0;
white-space: normal !important;
overflow-wrap: anywhere !important;
word-break: break-word !important;
overflow-x: hidden !important;
overflow-y: visible !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 p,
.navcell-desc div {
margin: 0 !important;
padding: 0 !important;
}
/* Nearby directly under description, also compact */
.nav-nearby {
width: 94%;
max-width: 640px;
margin: 6px 0 0 0;
padding: 0;
background: transparent;
border: none;
border-radius: 0;
font-size: 0.88em;
line-height: 1.15;
opacity: 0.95;
white-space: normal !important;
overflow-wrap: anywhere !important;
word-break: break-word !important;
overflow-x: hidden !important;
overflow-y: visible !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;
}
.navcell-ui {
margin: 4px 0 0 0;
padding: 0;
}
/* D pad */
.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;
}
/* Up and down should be a bit more separated than before */
.nav-vertical-row {
display: flex;
justify-content: center;
gap: 10px;
margin: 10px 0 0 0;
padding: 0;
}
.nav-vertical {
min-width: 70px;
padding: 6px 8px;
font-size: 0.7em;
}
/* Put dpad to the right of (desc + nearby) when the screen can handle it */
@media screen and (min-width: 620px) {
.navcell-top {
flex-direction: row;
align-items: flex-start;
justify-content: center;
gap: 18px;
padding: 0 10px;
}
.navcell-left {
width: auto;
max-width: 640px;
}
.navcell-ui {
margin: 0;
}
.navcell-desc,
.nav-nearby {
width: 100%;
max-width: 640px;
}
}
/* If the phone is short, tighten vertical spacing further */
@media screen and (max-height: 740px) {
.navcell {
gap: 4px;
}
.navcell-ui {
margin-top: 2px;
}
.nav-vertical-row {
margin-top: 8px;
}
}