Template:NavCell/styles.css: Difference between revisions
Template page
More actions
No edit summary |
No edit summary |
||
| Line 45: | Line 45: | ||
} | } | ||
/* | /* D pad cluster (includes UP and DOWN) */ | ||
.navcell-ui { | .navcell-ui { | ||
width: | width: 252px; | ||
height: | height: 146px; | ||
margin: 10px auto 0 auto; | margin: 10px auto 0 auto; | ||
position: relative; | position: relative; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
} | } | ||
| Line 112: | Line 96: | ||
} | } | ||
/* UP and DOWN | /* 3 by 3 grid sits to the right, leaving room for UP on the left and DOWN on the right */ | ||
UP is not | |||
.nav-grid { | |||
*/ | position: absolute; | ||
top: 24px; | |||
left: 56px; | |||
display: grid; | |||
grid-template-columns: 44px 44px 44px; | |||
grid-template-rows: 36px 36px 36px; | |||
gap: 4px; | |||
margin: 0; | |||
padding: 0; | |||
} | |||
/* Make the actual clickable D pad buttons slightly wider than tall */ | |||
.nav-grid .nav-btn { | |||
width: 44px; | |||
height: 36px; | |||
} | |||
.nav-grid .nav-btn a { | |||
padding: 0 2px; | |||
} | |||
/* Floating UP and DOWN, same size as D pad buttons, and constrained vertically: | |||
UP is not higher than NORTH, DOWN is not lower than SOUTH */ | |||
.nav-float-up { | .nav-float-up { | ||
position: absolute; | position: absolute; | ||
top: | top: 24px; /* same as grid top (not higher than NORTH) */ | ||
left: 0; | left: 0; | ||
width: | width: 44px; | ||
height: | height: 36px; | ||
font-size: 0.7em; | |||
font-size: 0. | |||
} | } | ||
.nav-float-down { | .nav-float-down { | ||
position: absolute; | position: absolute; | ||
top: | top: 104px; /* exactly aligned with SOUTH row (not lower than SOUTH) */ | ||
right: 0; | |||
width: | width: 44px; | ||
height: | height: 36px; | ||
font-size: 0.7em; | |||
font-size: 0. | |||
} | } | ||
/* Desktop layout: | /* Desktop layout: D pad to the right of text */ | ||
@media screen and (min-width: 760px) { | @media screen and (min-width: 760px) { | ||
Revision as of 09:29, 20 December 2025
/* Compact base layout */
.navcell {
width: 100%;
max-width: 900px;
margin: 0 auto;
box-sizing: border-box;
}
.navcell-top {
width: 100%;
box-sizing: border-box;
}
/* Compact text blocks */
.navcell-desc,
.nav-nearby,
.navcell-lore {
width: 94%;
margin: 8px auto 0 auto;
padding: 8px 10px;
font-size: 0.88em;
line-height: 1.12;
white-space: normal;
overflow-wrap: anywhere;
word-break: break-word;
background: transparent;
border: 1px solid rgba(120, 140, 180, 0.25);
border-radius: 12px;
box-sizing: border-box;
}
.navcell-desc p,
.navcell-desc div,
.nav-nearby p,
.nav-nearby div,
.navcell-lore p,
.navcell-lore div {
margin: 0;
padding: 0;
}
/* D pad cluster (includes UP and DOWN) */
.navcell-ui {
width: 252px;
height: 146px;
margin: 10px auto 0 auto;
position: relative;
box-sizing: border-box;
}
/* Shared button styling */
.nav-btn {
display: flex;
align-items: center;
justify-content: center;
background: #222;
border: 1px solid #444;
border-radius: 7px;
color: #eee;
text-align: center;
font-size: 0.72em;
line-height: 1.05em;
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;
}
/* 3 by 3 grid sits to the right, leaving room for UP on the left and DOWN on the right */
.nav-grid {
position: absolute;
top: 24px;
left: 56px;
display: grid;
grid-template-columns: 44px 44px 44px;
grid-template-rows: 36px 36px 36px;
gap: 4px;
margin: 0;
padding: 0;
}
/* Make the actual clickable D pad buttons slightly wider than tall */
.nav-grid .nav-btn {
width: 44px;
height: 36px;
}
.nav-grid .nav-btn a {
padding: 0 2px;
}
/* Floating UP and DOWN, same size as D pad buttons, and constrained vertically:
UP is not higher than NORTH, DOWN is not lower than SOUTH */
.nav-float-up {
position: absolute;
top: 24px; /* same as grid top (not higher than NORTH) */
left: 0;
width: 44px;
height: 36px;
font-size: 0.7em;
}
.nav-float-down {
position: absolute;
top: 104px; /* exactly aligned with SOUTH row (not lower than SOUTH) */
right: 0;
width: 44px;
height: 36px;
font-size: 0.7em;
}
/* Desktop layout: D pad to the right of text */
@media screen and (min-width: 760px) {
.navcell-top {
display: flex;
align-items: flex-start;
justify-content: center;
gap: 16px;
padding: 0 10px;
}
.navcell-left {
flex: 1 1 auto;
max-width: 640px;
}
.navcell-ui {
flex: 0 0 auto;
margin-top: 8px;
}
}