Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:NavCell/styles.css: Difference between revisions

Template page
No edit summary
No edit summary
Line 1: Line 1:
/* Compact base layout */
/* Base */


.navcell {
.navcell {
   width: 100%;
   width: 100%;
   max-width: 900px;
   max-width: 980px;
   margin: 0 auto;
   margin: 0 auto;
   box-sizing: border-box;
   box-sizing: border-box;
Line 13: Line 13:
}
}


/* Compact text blocks */
/* Text blocks: tighter, smaller, no weird wrapping */


.navcell-desc,
.navcell-desc,
Line 36: Line 36:


.navcell-desc p,
.navcell-desc p,
.nav-nearby p,
.navcell-lore p,
.navcell-desc div,
.navcell-desc div,
.nav-nearby p,
.nav-nearby div,
.nav-nearby div,
.navcell-lore p,
.navcell-lore div {
.navcell-lore div {
   margin: 0;
   margin: 0;
Line 45: Line 45:
}
}


/* D pad cluster (includes UP and DOWN) */
/* Inline nav (desktop default) */


.navcell-ui {
.navcell-ui {
   width: 252px;
   width: 216px;
   height: 146px;
   box-sizing: border-box;
   margin: 10px auto 0 auto;
   margin: 10px auto 0 auto;
  position: relative;
  box-sizing: border-box;
}
}
/* Shared button styling */


.nav-btn {
.nav-btn {
Line 83: Line 79:
   align-items: center;
   align-items: center;
   justify-content: center;
   justify-content: center;
  padding: 0 2px;
}
}


Line 96: Line 93:
}
}


/* 3 by 3 grid sits to the right, leaving room for UP on the left and DOWN on the right */
/* Gamepad layout inside the nav pad */


.nav-grid {
.nav-pad-inner {
   position: absolute;
   display: flex;
   top: 24px;
   align-items: center;
   left: 56px;
   justify-content: space-between;
  gap: 10px;
  width: 216px;
  box-sizing: border-box;
}


.nav-dpad {
   display: grid;
   display: grid;
   grid-template-columns: 44px 44px 44px;
   grid-template-columns: 44px 44px 44px;
   grid-template-rows: 36px 36px 36px;
   grid-template-rows: 36px 36px 36px;
   gap: 4px;
   gap: 4px;
   margin: 0;
   margin: 0;
   padding: 0;
   padding: 0;
}
}


/* Make the actual clickable D pad buttons slightly wider than tall */
.nav-dpad .nav-btn {
 
.nav-grid .nav-btn {
   width: 44px;
   width: 44px;
   height: 36px;
   height: 36px;
}
}


.nav-grid .nav-btn a {
.nav-ud {
   padding: 0 2px;
   display: flex;
}
  flex-direction: column;
 
   gap: 6px;
/* 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 {
.nav-ud .nav-btn {
  position: absolute;
  top: 104px;    /* exactly aligned with SOUTH row (not lower than SOUTH) */
  right: 0;
   width: 44px;
   width: 44px;
   height: 36px;
   height: 36px;
Line 144: Line 130:
}
}


/* Desktop layout: D pad to the right of text */
/* Desktop wide: keep text and inline nav side by side */


@media screen and (min-width: 760px) {
@media screen and (min-width: 760px) {
Line 157: Line 143:
   .navcell-left {
   .navcell-left {
     flex: 1 1 auto;
     flex: 1 1 auto;
     max-width: 640px;
     max-width: 720px;
   }
   }


Line 163: Line 149:
     flex: 0 0 auto;
     flex: 0 0 auto;
     margin-top: 8px;
     margin-top: 8px;
  }
}
/* Mobile: make the nav pad fixed at the bottom like a gamepad */
@media screen and (max-width: 759px) {
  body.sk-navpad-on .navcell-ui {
    position: fixed;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    z-index: 9999;
    margin: 0;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
  }
  body.sk-navpad-on .navcell {
    padding-bottom: 92px;
  }
  body.sk-navpad-off .navcell-ui {
    display: none;
   }
   }
}
}

Revision as of 09:41, 20 December 2025

/* Base */

.navcell {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  box-sizing: border-box;
}

.navcell-top {
  width: 100%;
  box-sizing: border-box;
}

/* Text blocks: tighter, smaller, no weird wrapping */

.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,
.nav-nearby p,
.navcell-lore p,
.navcell-desc div,
.nav-nearby div,
.navcell-lore div {
  margin: 0;
  padding: 0;
}

/* Inline nav (desktop default) */

.navcell-ui {
  width: 216px;
  box-sizing: border-box;
  margin: 10px auto 0 auto;
}

.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;
  padding: 0 2px;
}

.nav-btn:hover {
  background: #333;
  border-color: #777;
}

.nav-empty,
.nav-center {
  background: transparent;
  border: none;
}

/* Gamepad layout inside the nav pad */

.nav-pad-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 216px;
  box-sizing: border-box;
}

.nav-dpad {
  display: grid;
  grid-template-columns: 44px 44px 44px;
  grid-template-rows: 36px 36px 36px;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.nav-dpad .nav-btn {
  width: 44px;
  height: 36px;
}

.nav-ud {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-ud .nav-btn {
  width: 44px;
  height: 36px;
  font-size: 0.7em;
}

/* Desktop wide: keep text and inline nav side by side */

@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: 720px;
  }

  .navcell-ui {
    flex: 0 0 auto;
    margin-top: 8px;
  }
}

/* Mobile: make the nav pad fixed at the bottom like a gamepad */

@media screen and (max-width: 759px) {
  body.sk-navpad-on .navcell-ui {
    position: fixed;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    z-index: 9999;

    margin: 0;
    padding: 8px 10px;

    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
  }

  body.sk-navpad-on .navcell {
    padding-bottom: 92px;
  }

  body.sk-navpad-off .navcell-ui {
    display: none;
  }
}