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

MediaWiki:Common.css: Difference between revisions

MediaWiki interface page
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 1: Line 1:
/* =================================================================== */
@supports (syntax: '<angle>') {
/* TÉCNICA FINAL: EFEITO DE BORDA ANIMADA (À PROVA DE CONFLITOS)    */
  @property --gradient-angle {
/* Usa ::before para o brilho e ::after para o fundo sólido.        */
     syntax: '<angle>';
/* =================================================================== */
    initial-value: 0deg;
    inherits: false;
  }
}


/* Elemento com o glow animado */
.scw-gradient-glow {
.scw-gradient-glow {
    /* --- Contêiner Principal --- */
  position: relative;
    position: relative;
  display: inline-block;
    display: inline-block;
  padding: 10px 20px;
    cursor: pointer;
  border-radius: 8px;
    padding: 10px 18px; /* << AJUSTE o espaçamento interno do botão */
  background-color: #1a242e;
    border-radius: 4px; /* << AJUSTE o arredondamento */
  color: white;
    color: white;       /* << Cor inicial do texto */
  font-size: 16px;
    background: transparent; /* O contêiner em si é transparente */
  z-index: 0;
    transition: color 0.2s ease-in-out; /* Transição suave para a cor do texto no hover */
  overflow: hidden;
  border: none; /* Removemos a borda real para dar espaço pro efeito */
}
 
/* Elemento real dentro do botão (caso precise conteúdo) */
.scw-gradient-glow span {
  position: relative;
  z-index: 1;
}
}


/* Camada de Baixo: O Brilho Giratório */
/* Pseudo-elemento com a borda animada */
.scw-gradient-glow::before {
.scw-gradient-glow::before {
    content: '';
  content: '';
    position: absolute;
  position: absolute;
    left: 0; top: 0;
  inset: -3px; /* <- Esse valor deve ser igual ou maior que o blur */
    width: 100%; height: 100%;
  z-index: -1;
    z-index: -2; /* Fica atrás de tudo */
  border-radius: inherit;
    border-radius: inherit; /* Segue o arredondamento do pai */


    /* Gradiente */
  --clr-3: #59cffc;
    --clr-3: #59cffc;
  --clr-4: #38556a;
    --clr-4: #38556a;
  --clr-5: #233545;
    --clr-5: #233545;
  --gradient: var(--clr-3), var(--clr-4), var(--clr-5), var(--clr-4), var(--clr-3);
    --gradient: var(--clr-3), var(--clr-4), var(--clr-5), var(--clr-4), var(--clr-3);
  --gradient-time: 5s;
    --gradient-time: 5s;
  --gradient-blur: 6px;
    background: conic-gradient(from 0deg, var(--gradient));
    animation: scw-gradient-rotate-fallback var(--gradient-time) linear infinite;
}


/* Camada do Meio: O Fundo Sólido do Botão */
  background: conic-gradient(from var(--gradient-angle, 0deg), var(--gradient));
.scw-gradient-glow::after {
  animation: scw-gradient-rotate-modern var(--gradient-time) linear infinite;
    content: '';
  filter: blur(var(--gradient-blur));
    position: absolute;
  transition: filter 0.2s ease;
    z-index: -1; /* Fica na frente do brilho, mas atrás do texto */
    /* Cria a "borda" de 2px, pois é 2px menor que o ::before em cada lado */
    inset: 2px;
    /* O raio da borda interna deve ser um pouco menor que o do contêiner */
    border-radius: 2px;
    /* Cor de fundo inicial do botão */
    background: #1a242e; /* << AJUSTE a cor de fundo padrão */
    transition: background 0.2s ease-in-out; /* Transição suave para a cor do hover */
}
}


/* --- O EFEITO DE HOVER --- */
/* Efeito glow extra no hover */
.scw-gradient-glow:hover::after {
.scw-gradient-glow:hover::before {
    background: #c7b00f; /* << AJUSTE a cor de fundo do hover (amarelo) */
  filter: blur(10px);
}
}


.scw-gradient-glow:hover {
@keyframes scw-gradient-rotate-modern {
    color: black; /* << AJUSTE a cor do texto no hover */
  0% { --gradient-angle: 0deg; }
  100% { --gradient-angle: 360deg; }
}
}


/* Fallback para navegadores sem @property */
@supports not (syntax: '<angle>') {
  .scw-gradient-glow::before {
    animation: scw-gradient-rotate-fallback var(--gradient-time) linear infinite;
    transform-origin: center;
  }


/* --- Animação (Fallback para navegadores antigos) --- */
  @keyframes scw-gradient-rotate-fallback {
@keyframes scw-gradient-rotate-fallback {
     0% { transform: rotate(0deg); }
     0% { transform: rotate(0deg); }
     100% { transform: rotate(360deg); }
     100% { transform: rotate(360deg); }
}
  }
 
/* --- MELHORIA PARA NAVEGADORES MODERNOS (ignorado por navegadores antigos) --- */
@supports (syntax: '<angle>') {
 
    @property --gradient-angle {
        syntax: '<angle>';
        initial-value: 0deg;
        inherits: false;
    }
 
    .scw-gradient-glow::before {
        background: conic-gradient(from var(--gradient-angle), var(--gradient));
        animation: scw-gradient-rotate-modern var(--gradient-time) linear infinite;
        transform: none;
    }
 
    @keyframes scw-gradient-rotate-modern {
        0% { --gradient-angle: 0deg; }
        100% { --gradient-angle: 360deg; }
    }
}
}

Revision as of 15:20, 29 July 2025

@supports (syntax: '<angle>') {
  @property --gradient-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
  }
}

/* Elemento com o glow animado */
.scw-gradient-glow {
  position: relative;
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  background-color: #1a242e;
  color: white;
  font-size: 16px;
  z-index: 0;
  overflow: hidden;
  border: none; /* Removemos a borda real para dar espaço pro efeito */
}

/* Elemento real dentro do botão (caso precise conteúdo) */
.scw-gradient-glow span {
  position: relative;
  z-index: 1;
}

/* Pseudo-elemento com a borda animada */
.scw-gradient-glow::before {
  content: '';
  position: absolute;
  inset: -3px; /* <- Esse valor deve ser igual ou maior que o blur */
  z-index: -1;
  border-radius: inherit;

  --clr-3: #59cffc;
  --clr-4: #38556a;
  --clr-5: #233545;
  --gradient: var(--clr-3), var(--clr-4), var(--clr-5), var(--clr-4), var(--clr-3);
  --gradient-time: 5s;
  --gradient-blur: 6px;

  background: conic-gradient(from var(--gradient-angle, 0deg), var(--gradient));
  animation: scw-gradient-rotate-modern var(--gradient-time) linear infinite;
  filter: blur(var(--gradient-blur));
  transition: filter 0.2s ease;
}

/* Efeito glow extra no hover */
.scw-gradient-glow:hover::before {
  filter: blur(10px);
}

@keyframes scw-gradient-rotate-modern {
  0% { --gradient-angle: 0deg; }
  100% { --gradient-angle: 360deg; }
}

/* Fallback para navegadores sem @property */
@supports not (syntax: '<angle>') {
  .scw-gradient-glow::before {
    animation: scw-gradient-rotate-fallback var(--gradient-time) linear infinite;
    transform-origin: center;
  }

  @keyframes scw-gradient-rotate-fallback {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
}