« Modèle:Button/styles.css » : différence entre les versions
De Nefald
Autres actions
m blue color |
citizen thème var |
||
| Ligne 3 : | Ligne 3 : | ||
============================================ */ | ============================================ */ | ||
.button-link-vars { | .button-link-vars { | ||
--btn-progressive: | --btn-progressive: #36c; | ||
--btn-progressive-hover: #2563eb; | |||
--btn-surface-0: var(--color-surface-0); | |||
--btn-surface-1: var(--color-surface-1); | --btn-surface-1: var(--color-surface-1); | ||
--btn-surface-2: var(--color-surface-2); | --btn-surface-2: var(--color-surface-2); | ||
--btn- | --btn-surface-3: var(--color-surface-3); | ||
--btn-surface-4: var(--color-surface-4); | |||
--btn-text-light: #ffffff; | |||
--btn-text-dark: var(--color-base); | |||
} | } | ||
| Ligne 19 : | Ligne 24 : | ||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); | ||
position: relative; | position: relative; | ||
background: var(--btn-progressive | background: var(--btn-progressive); /* #36c PAR DÉFAUT */ | ||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
justify-content: center; | justify-content: center; | ||
} | } | ||
.button-link-wrapper:hover { | .button-link-wrapper:hover { | ||
transform: translateY(-2px); | transform: translateY(-2px); | ||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); | box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); | ||
background: var(--btn-progressive-hover); | |||
} | } | ||
| Ligne 39 : | Ligne 44 : | ||
.button-link-content a { | .button-link-content a { | ||
color: var(--btn-text | color: var(--btn-text-light) !important; | ||
text-decoration: none !important; | text-decoration: none !important; | ||
display: flex; | display: flex; | ||
| Ligne 50 : | Ligne 55 : | ||
.button-link-content a:hover, | .button-link-content a:hover, | ||
.button-link-content a:visited { | .button-link-content a:visited { | ||
color: var(--btn-text | color: var(--btn-text-light) !important; | ||
} | } | ||
| Ligne 80 : | Ligne 85 : | ||
/* ============================================ | /* ============================================ | ||
COULEURS PRÉDÉFINIES | COULEURS PRÉDÉFINIES (logos) | ||
============================================ */ | ============================================ */ | ||
/* ========== COULEURS | /* ========== COULEURS GÉNÉRIQUES ========== */ | ||
.button-link-- | .button-link--danger { background: #dc3545; } | ||
.button-link--dark { background: #343a40; } | |||
} | .button-link--info { background: #17a2b8; } | ||
.button-link-- | |||
} | |||
.button-link--light { | .button-link--light { | ||
background: var(--btn-surface-1 | background: var(--btn-surface-1); | ||
} | } | ||
.button-link--light .button-link-content a { | .button-link--light .button-link-content a { | ||
color: var(-- | color: var(--btn-text-dark) !important; | ||
} | } | ||
.button-link--primary { background: var(--btn-progressive); } | |||
.button-link--secondary { background: var(--btn-surface-2); } | |||
.button-link-- | |||
.button-link-- | |||
.button-link--success { background: #28a745; } | .button-link--success { background: #28a745; } | ||
.button-link--warning { | .button-link--warning { background: #ffc107; } | ||
} | |||
.button-link--warning .button-link-content a { | .button-link--warning .button-link-content a { | ||
color: #000 !important; | color: #000 !important; | ||
} | } | ||
/* ========== VARIABLES CITIZEN (nouvelles options) ========== */ | |||
.button-link--surface-0 { background: var(--btn-surface-0); } | |||
.button-link--surface-0 .button-link-content a { color: var(--btn-text-dark) !important; } | |||
.button-link--surface-1 { background: var(--btn-surface-1); } | |||
.button-link--surface-1 .button-link-content a { color: var(--btn-text-dark) !important; } | |||
.button-link--surface-2 { background: var(--btn-surface-2); } | |||
.button-link--surface-2 .button-link-content a { color: var(--btn-text-dark) !important; } | |||
.button-link--surface-3 { background: var(--btn-surface-3); } | |||
.button-link--surface-3 .button-link-content a { color: var(--btn-text-dark) !important; } | |||
.button-link--surface-4 { background: var(--btn-surface-4); } | |||
.button-link--surface-4 .button-link-content a { color: var(--btn-text-light) !important; } | |||
.button-link--progressive { background: var(--btn-progressive); } | |||
/* ========== RÉSEAUX SOCIAUX ========== */ | /* ========== RÉSEAUX SOCIAUX ========== */ | ||
Version du 11 février 2026 à 13:32
/* ============================================
VARIABLES CSS (wrapper pour TemplateStylesExtender)
============================================ */
.button-link-vars {
--btn-progressive: #36c;
--btn-progressive-hover: #2563eb;
--btn-surface-0: var(--color-surface-0);
--btn-surface-1: var(--color-surface-1);
--btn-surface-2: var(--color-surface-2);
--btn-surface-3: var(--color-surface-3);
--btn-surface-4: var(--color-surface-4);
--btn-text-light: #ffffff;
--btn-text-dark: var(--color-base);
}
/* ============================================
BOUTON - Base
============================================ */
.button-link-wrapper {
min-height: 80px;
border-radius: 12px;
overflow: hidden;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
position: relative;
background: var(--btn-progressive); /* #36c PAR DÉFAUT */
display: flex;
align-items: center;
justify-content: center;
}
.button-link-wrapper:hover {
transform: translateY(-2px);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
background: var(--btn-progressive-hover);
}
.button-link-content {
width: 100%;
height: 100%;
text-align: center;
padding: 1rem;
}
.button-link-content a {
color: var(--btn-text-light) !important;
text-decoration: none !important;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
}
.button-link-content a:hover,
.button-link-content a:visited {
color: var(--btn-text-light) !important;
}
/* CONTENEUR D'IMAGE DE TAILLE FIXE */
.button-link-content .mw-file-description {
display: flex;
align-items: center;
justify-content: center;
width: 200px;
height: 50px;
margin: 0 auto 0.5rem;
overflow: hidden;
}
/* IMAGE RESPONSIVE DANS LE CONTENEUR */
.button-link-content img {
max-width: 100%;
max-height: 100%;
width: auto !important;
height: auto !important;
object-fit: contain;
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}
/* Masquer l'icône de lien externe */
.button-link-content a.external::after {
display: none !important;
}
/* ============================================
COULEURS PRÉDÉFINIES (logos)
============================================ */
/* ========== COULEURS GÉNÉRIQUES ========== */
.button-link--danger { background: #dc3545; }
.button-link--dark { background: #343a40; }
.button-link--info { background: #17a2b8; }
.button-link--light {
background: var(--btn-surface-1);
}
.button-link--light .button-link-content a {
color: var(--btn-text-dark) !important;
}
.button-link--primary { background: var(--btn-progressive); }
.button-link--secondary { background: var(--btn-surface-2); }
.button-link--success { background: #28a745; }
.button-link--warning { background: #ffc107; }
.button-link--warning .button-link-content a {
color: #000 !important;
}
/* ========== VARIABLES CITIZEN (nouvelles options) ========== */
.button-link--surface-0 { background: var(--btn-surface-0); }
.button-link--surface-0 .button-link-content a { color: var(--btn-text-dark) !important; }
.button-link--surface-1 { background: var(--btn-surface-1); }
.button-link--surface-1 .button-link-content a { color: var(--btn-text-dark) !important; }
.button-link--surface-2 { background: var(--btn-surface-2); }
.button-link--surface-2 .button-link-content a { color: var(--btn-text-dark) !important; }
.button-link--surface-3 { background: var(--btn-surface-3); }
.button-link--surface-3 .button-link-content a { color: var(--btn-text-dark) !important; }
.button-link--surface-4 { background: var(--btn-surface-4); }
.button-link--surface-4 .button-link-content a { color: var(--btn-text-light) !important; }
.button-link--progressive { background: var(--btn-progressive); }
/* ========== RÉSEAUX SOCIAUX ========== */
.button-link--bluesky { background: #0085ff; }
.button-link--discord { background: #5865f2; }
.button-link--facebook { background: #1877f2; }
.button-link--instagram {
background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
.button-link--linkedin { background: #0077b5; }
.button-link--mastodon { background: #6364ff; }
.button-link--reddit { background: #ff4500; }
.button-link--snapchat {
background: #fffc00;
color: #000 !important;
}
.button-link--snapchat .button-link-content a {
color: #000 !important;
}
.button-link--threads { background: #000000; }
.button-link--tiktok { background: #000000; }
.button-link--twitch { background: #9146ff; }
.button-link--twitter { background: #1da1f2; }
.button-link--youtube { background: #ff0000; }
/* ========== HÉBERGEMENT DE CODE ========== */
.button-link--github { background: #24292e; }
.button-link--gitlab { background: #fc6f23; }
/* ========== SERVICES DE DÉVELOPPEMENT ========== */
.button-link--codepen { background: #ffffff; }
.button-link--docker { background: #2496ed; }
.button-link--gradle { background: #02303a; }
.button-link--jenkins { background: #d24939; }
.button-link--kubernetes { background: #326ce5; }
.button-link--maven { background: #c71a36; }
.button-link--npm { background: #cb3837; }
.button-link--stackoverflow { background: #f48024; }
/* ========== MINECRAFT MODLOADERS ========== */
.button-link--fabric { background: #dbd3c8; }
.button-link--forge { background: #1e2c42; }
.button-link--minecraft { background: #62b47a; }
.button-link--neoforge { background: #ff6b35; }
.button-link--quilt { background: #8b5cf6; }
/* ========== PLATEFORMES DE PLUGINS ========== */
.button-link--bukkit { background: #f7931e; }
.button-link--curseforge { background: #f16436; }
.button-link--github-releases { background: #238636; }
.button-link--hangar { background: #0089ff; }
.button-link--modrinth { background: #1bd96a; }
.button-link--paper { background: #1a8cff; }
.button-link--polymart { background: #2196f3; }
.button-link--purpur { background: #a855f7; }
.button-link--spigot { background: #ed8106; }
/* ========== PLATEFORMES DE FINANCEMENT ========== */
.button-link--buymeacoffee { background: #ffdd00; }
.button-link--helloasso { background: #4C40CF; }
.button-link--helloasso:hover { background: #3d3fc7; }
.button-link--kofi { background: #ff5e5b; }
.button-link--liberapay { background: #f6c915; }
.button-link--opencollective { background: #7fadf2; }
.button-link--patreon { background: #ff424d; }
.button-link--paypal {
background: linear-gradient(135deg, #0070ba 0%, #1546a0 100%);
}
.button-link--paypal:hover {
background: linear-gradient(135deg, #005ea6 0%, #003087 100%);
}
.button-link--qonto { background: #1d1d1dff; }
.button-link--stripe { background: #635BFF; }
/* ============================================
ALIGNEMENT + WIDTH FIXE
============================================ */
.button-link--align-left {
width: 300px;
margin-right: auto;
margin-left: 0;
}
.button-link--align-center {
width: 300px;
margin-left: auto;
margin-right: auto;
}
.button-link--align-right {
width: 300px;
margin-left: auto;
margin-right: 0;
}
/* ============================================
HAUTEUR PERSONNALISÉE + NO-LOGO
============================================ */
.button-link-wrapper.button-link--no-logo .button-link-content {
padding: 0.35rem 1rem;
}
.button-link-wrapper.button-link--no-logo .button-link-content a {
line-height: 1.1;
}