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
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
/* Container */
/* =========================================================
  NavCell – STABLE, INLINE STYLES ONLY
  (NO fixed / bottom / transform — TemplateStyles safe)
  ========================================================= */
 
/* Base container */
 
.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 */
/* ---------------------------------------------------------
.navcell-ui {
  Text blocks – compact MUD-style
   position: fixed;
  --------------------------------------------------------- */
   bottom: 14px;
 
   left: 14px;
.navcell-desc,
   z-index: 9999;
.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: 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 */
/* ---------------------------------------------------------
.nav-grid {
  Navigation UI – INLINE ONLY (floating handled elsewhere)
   display: grid;
  --------------------------------------------------------- */
   grid-template-columns: 42px 42px 42px;
 
   grid-template-rows: 42px 42px 42px;
.navcell-ui {
  gap: 6px;
   width: 260px;
   margin: 10px auto 0 auto;
   box-sizing: border-box;
}
}
/* Buttons */


.nav-btn {
.nav-btn {
Line 33: Line 70:


   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 4px;
}
.nav-btn:hover {
  background: #333;
  border-color: #777;
}
}


.nav-center,
.nav-empty,
.nav-empty {
.nav-center {
   background: transparent;
   background: transparent;
  border: none;
}
/* ---------------------------------------------------------
  Gamepad layout
  --------------------------------------------------------- */
.nav-pad-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 260px;
  box-sizing: border-box;
}
.nav-dpad {
  display: grid;
  grid-template-columns: 52px 52px 52px;
  grid-template-rows: 40px 40px 40px;
  gap: 6px;
  margin: 0;
  padding: 0;
}
.nav-dpad .nav-btn {
  width: 52px;
  height: 40px;
}
}


/* Up / Down */
/* Up / Down */
.nav-ud {
.nav-ud {
   display: flex;
   display: flex;
   justify-content: space-between;
   flex-direction: column;
   margin-top: 6px;
   gap: 8px;
}
}


.nav-ud .nav-btn {
.nav-ud .nav-btn {
   width: 42px;
   width: 60px;
   height: 32px;
   height: 40px;
   font-size: 10px;
   font-size: 0.7em;
}
}


/* Text content */
/* ---------------------------------------------------------
.nav-text {
  Desktop layout
   margin-top: 8px;
  --------------------------------------------------------- */
}
 
@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;
  }


.nav-desc {
  .navcell-ui {
  font-size: 13px;
    margin-top: 8px;
   line-height: 1.2;
   }
  margin-bottom: 4px;
}
}


.nav-nearby {
/* ---------------------------------------------------------
  font-size: 12px;
  Mobile inline fallback
  opacity: 0.85;
  (NO floating here – floating lives in Common.css)
}
  --------------------------------------------------------- */


/* Prevent overlap */
@media screen and (max-width: 759px) {
@media (max-width: 900px) {
   .navcell-ui {
   .nav-text {
     margin: 12px auto;
     padding-bottom: 140px;
   }
   }
}
}

Latest revision as of 07:39, 21 December 2025

/* =========================================================
   NavCell – STABLE, INLINE STYLES ONLY
   (NO fixed / bottom / transform — TemplateStyles safe)
   ========================================================= */

/* Base container */

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

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

/* ---------------------------------------------------------
   Text blocks – compact MUD-style
   --------------------------------------------------------- */

.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;
}

/* ---------------------------------------------------------
   Navigation UI – INLINE ONLY (floating handled elsewhere)
   --------------------------------------------------------- */

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

/* Buttons */

.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 4px;
}

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

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

/* ---------------------------------------------------------
   Gamepad layout
   --------------------------------------------------------- */

.nav-pad-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  width: 260px;
  box-sizing: border-box;
}

.nav-dpad {
  display: grid;
  grid-template-columns: 52px 52px 52px;
  grid-template-rows: 40px 40px 40px;
  gap: 6px;

  margin: 0;
  padding: 0;
}

.nav-dpad .nav-btn {
  width: 52px;
  height: 40px;
}

/* Up / Down */

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

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

/* ---------------------------------------------------------
   Desktop layout
   --------------------------------------------------------- */

@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 {
    margin-top: 8px;
  }
}

/* ---------------------------------------------------------
   Mobile inline fallback
   (NO floating here – floating lives in Common.css)
   --------------------------------------------------------- */

@media screen and (max-width: 759px) {
  .navcell-ui {
    margin: 12px auto;
  }
}