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

Template:Main page/navigation/styles.css: Difference between revisions

Template page
Blanked the page
Tag: Blanking
No edit summary
 
Line 1: Line 1:
/* --- Container Principal --- */
.template-navpills {
  display: grid;
  gap: var(--space-xs);
  /* Define 8 colunas por padrão */
  grid-template-columns: repeat(8, minmax(128px, 1fr));
  grid-auto-rows: 2rem;
  font-size: var(--font-size-small);
}


/* Contexto específico se estiver dentro de .main-page-navigation */
.main-page-navigation > div.template-navpills {
  position: relative;
}
/* --- Elementos Individuais (Pills) --- */
.template-navpill {
  position: relative;
  border: 1px solid var(--color-base);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-xx-small);
  overflow: hidden;
  white-space: nowrap;
}
/* Estilo do Link dentro do Pill */
.template-navpill > a {
  position: relative;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  color: var(--color-emphasized);
  text-decoration: none;
  height: 100%;
}
/* Interatividade (Hover/Active) */
.template-navpill:hover {
  background: var(--background-color-button-quiet--hover);
}
.template-navpill:active {
  background: var(--background-color-button-quiet--active);
}
/* --- Modificadores de Tamanho (big/wide) --- */
.navpill-placeholder {
  /* célula vazia */
}
.navpill-big {
  grid-row: span 2;
  justify-items: center;
}
.navpill-big > a {
  text-align: center;
  white-space: break-spaces;
}
.navpill-wide {
  grid-column: span 2;
}
.navpill-wide > a {
  text-align: center;
}
/* --- Imagens de Fundo e Sobreposições --- */
.template-navpill-background {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
/* Gradiente escuro para legibilidade do texto sobre a imagem */
.template-navpill-background:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #000, transparent);
  transition: transform 250ms ease;
}
.template-navpill-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-hover);
  transition-property: transform;
}
/* Efeitos de Hover na Imagem */
.template-navpill:hover .template-navpill-background::after {
  transform: translateX(-100%);
}
.template-navpill:hover .template-navpill-background img {
  transform: scale(1.1);
}
/* Ajuste de cor e sombra do texto quando há imagem de fundo */
.template-navpill > .template-navpill-background + a {
  color: #fff;
  text-shadow: -1px 0 0.2em #000, 0 1px 0.2em #000, 1px 0 0.2em #000,
    0 -1px 0.2em #000;
}
/* --- Responsividade (Media Queries) --- */
/* Tablet / Telas Médias (901px - 1080px) */
@media screen and (min-width: 901px) and (max-width: 1080px) {
  .template-navpills {
    /* Reduz para 4 colunas */
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    grid-auto-rows: 2.5rem;
  }
  .navpill-placeholder {
    display: none;
  }
}
/* Mobile / Telas Pequenas (max 900px) */
@media screen and (max-width: 900px) {
  .template-navpills {
    /* Reduz para 2 colunas */
    grid-template-columns: repeat(2, minmax(80px, 1fr));
    grid-auto-rows: 2.5rem;
  }
  .navpill-placeholder {
    display: none;
  }
  .navpill-big > a {
    white-space: normal;
  }
}

Latest revision as of 15:06, 21 November 2025

/* --- Container Principal --- */
.template-navpills {
  display: grid;
  gap: var(--space-xs);
  /* Define 8 colunas por padrão */
  grid-template-columns: repeat(8, minmax(128px, 1fr));
  grid-auto-rows: 2rem;
  font-size: var(--font-size-small);
}

/* Contexto específico se estiver dentro de .main-page-navigation */
.main-page-navigation > div.template-navpills {
  position: relative;
}

/* --- Elementos Individuais (Pills) --- */
.template-navpill {
  position: relative;
  border: 1px solid var(--color-base);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-xx-small);
  overflow: hidden;
  white-space: nowrap;
}

/* Estilo do Link dentro do Pill */
.template-navpill > a {
  position: relative;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  color: var(--color-emphasized);
  text-decoration: none;
  height: 100%;
}

/* Interatividade (Hover/Active) */
.template-navpill:hover {
  background: var(--background-color-button-quiet--hover);
}

.template-navpill:active {
  background: var(--background-color-button-quiet--active);
}

/* --- Modificadores de Tamanho (big/wide) --- */
.navpill-placeholder {
  /* célula vazia */
}

.navpill-big {
  grid-row: span 2;
  justify-items: center;
}

.navpill-big > a {
  text-align: center;
  white-space: break-spaces;
}

.navpill-wide {
  grid-column: span 2;
}

.navpill-wide > a {
  text-align: center;
}

/* --- Imagens de Fundo e Sobreposições --- */
.template-navpill-background {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Gradiente escuro para legibilidade do texto sobre a imagem */
.template-navpill-background:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #000, transparent);
  transition: transform 250ms ease;
}

.template-navpill-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-hover);
  transition-property: transform;
}

/* Efeitos de Hover na Imagem */
.template-navpill:hover .template-navpill-background::after {
  transform: translateX(-100%);
}

.template-navpill:hover .template-navpill-background img {
  transform: scale(1.1);
}

/* Ajuste de cor e sombra do texto quando há imagem de fundo */
.template-navpill > .template-navpill-background + a {
  color: #fff;
  text-shadow: -1px 0 0.2em #000, 0 1px 0.2em #000, 1px 0 0.2em #000,
    0 -1px 0.2em #000;
}

/* --- Responsividade (Media Queries) --- */

/* Tablet / Telas Médias (901px - 1080px) */
@media screen and (min-width: 901px) and (max-width: 1080px) {
  .template-navpills {
    /* Reduz para 4 colunas */
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    grid-auto-rows: 2.5rem;
  }
  .navpill-placeholder {
    display: none;
  }
}

/* Mobile / Telas Pequenas (max 900px) */
@media screen and (max-width: 900px) {
  .template-navpills {
    /* Reduz para 2 colunas */
    grid-template-columns: repeat(2, minmax(80px, 1fr));
    grid-auto-rows: 2.5rem;
  }
  .navpill-placeholder {
    display: none;
  }
  .navpill-big > a {
    white-space: normal;
  }
}