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
Tag: Reverted
No edit summary
Tag: Manual revert
Line 1: Line 1:
/* Container */
/* Base */
 
.navcell {
.navcell {
   max-width: 100%;
  width: 100%;
   padding: 8px;
   max-width: 980px;
  margin: 0 auto;
  box-sizing: border-box;
}
 
.navcell-top {
  width: 100%;
   box-sizing: border-box;
}
}


/* FLOATING GAMEPAD — THIS IS THE FIX */
/* Text blocks: tighter, smaller, no weird wrapping */
.navcell-ui {
 
   position: fixed;
.navcell-desc,
   bottom: 14px;
.nav-nearby,
   left: 14px;
.navcell-lore {
   z-index: 9999;
   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: rgba(0,0,0,0.75);
   background: transparent;
  border: 1px solid rgba(120, 140, 180, 0.25);
   border-radius: 12px;
   border-radius: 12px;
   padding: 8px;
   box-sizing: border-box;
}


   width: auto;
.navcell-desc p,
.nav-nearby p,
.navcell-lore p,
.navcell-desc div,
.nav-nearby div,
.navcell-lore div {
   margin: 0;
  padding: 0;
}
}


/* D-pad */
/* Inline nav (desktop default) */
.nav-grid {
 
   display: grid;
.navcell-ui {
   grid-template-columns: 42px 42px 42px;
   width: 216px;
  grid-template-rows: 42px 42px 42px;
   box-sizing: border-box;
   gap: 6px;
   margin: 10px auto 0 auto;
}
}


Line 33: Line 59:


   background: #222;
   background: #222;
   border-radius: 6px;
  border: 1px solid #444;
   border-radius: 7px;


   font-size: 11px;
   color: #eee;
  line-height: 1.1;
   text-align: center;
   text-align: center;
  font-size: 0.72em;
  line-height: 1.05em;
  box-sizing: border-box;
}
}


.nav-btn a {
.nav-btn a {
   color: #eee;
   color: inherit;
   text-decoration: none;
   text-decoration: none;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
}
}


.nav-center,
.nav-btn:hover {
.nav-empty {
  background: #333;
  border-color: #777;
}
 
.nav-empty,
.nav-center {
   background: transparent;
   background: transparent;
  border: none;
}
}


/* Up / Down */
/* Gamepad layout inside the nav pad */
.nav-ud {
 
.nav-pad-inner {
   display: flex;
   display: flex;
  align-items: center;
   justify-content: space-between;
   justify-content: space-between;
   margin-top: 6px;
  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-ud .nav-btn {
.nav-dpad .nav-btn {
   width: 42px;
   width: 44px;
   height: 32px;
   height: 36px;
  font-size: 10px;
}
}


/* Text content */
.nav-ud {
.nav-text {
   display: flex;
   margin-top: 8px;
  flex-direction: column;
  gap: 6px;
}
}


.nav-desc {
.nav-ud .nav-btn {
   font-size: 13px;
   width: 44px;
   line-height: 1.2;
   height: 36px;
   margin-bottom: 4px;
   font-size: 0.7em;
}
}


.nav-nearby {
/* Desktop wide: keep text and inline nav side by side */
   font-size: 12px;
 
   opacity: 0.85;
@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;
  }
}
}


/* Prevent overlap */
/* Mobile: make the nav pad fixed at the bottom like a gamepad */
@media (max-width: 900px) {
 
   .nav-text {
@media screen and (max-width: 759px) {
     padding-bottom: 140px;
   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 16:40, 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;
  }
}