« Modèle:Badge/styles.css » : différence entre les versions
De Nefald
Autres actions
Page créée avec « →============================================ BADGE SYSTEM - Système modulaire et adaptable ============================================ : →=== Base du badge === : .badge { display: inline-block; font-size: 0.5em; font-weight: 700; padding: 0.4em 0.8em; border-radius: 6px; margin-left: 0.5em; vertical-align: middle; text-transform: uppercase; letter-spacing: 0.8px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); transition: all 0.3s ease; white-space: now... » |
mAucun résumé des modifications |
||
| (6 versions intermédiaires par le même utilisateur non affichées) | |||
| Ligne 1 : | Ligne 1 : | ||
/* ============================================ | /* ============================================ | ||
BADGE SYSTEM - | BADGE SYSTEM - Design FLAT lisible | ||
============================================ */ | ============================================ */ | ||
| Ligne 6 : | Ligne 6 : | ||
.badge { | .badge { | ||
display: inline-block; | display: inline-block; | ||
font-size: 0. | font-size: 0.65em; | ||
font-weight: | font-weight: 600; | ||
padding: 0. | padding: 0.5em 0.9em; | ||
border-radius: | border-radius: 3px; | ||
margin-left: 0.5em; | margin-left: 0.5em; | ||
vertical-align: middle; | vertical-align: middle; | ||
text-transform: uppercase; | text-transform: uppercase; | ||
letter-spacing: | letter-spacing: 1px; | ||
transition: all 0.2s ease; | |||
transition: all 0. | |||
white-space: nowrap; | white-space: nowrap; | ||
line-height: 1. | line-height: 1.4; | ||
border: none; | |||
box-shadow: none; | |||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; | |||
} | } | ||
.badge:hover { | .badge:hover { | ||
filter: brightness(1.15); | |||
transform: translateY(-1px); | transform: translateY(-1px); | ||
} | } | ||
/* === Présets | /* === Présets FLAT === */ | ||
/* Default (gris neutre) */ | /* Default (gris neutre) */ | ||
.badge-default { | .badge-default { | ||
background: | background: #6b7280; | ||
color: white; | color: white; | ||
} | } | ||
/* Beta (violet) */ | /* Beta (violet) */ | ||
.badge-beta { | .badge-beta { | ||
background: | background: #7c3aed; | ||
color: white; | color: white; | ||
} | } | ||
/* Alpha (orange) */ | /* Alpha (orange) */ | ||
.badge-alpha { | .badge-alpha { | ||
background: | background: #f97316; | ||
color: white; | color: white; | ||
} | } | ||
/* New (vert) */ | /* New (vert menthe) */ | ||
.badge-new { | .badge-new { | ||
background: | background: #10b981; | ||
color: white; | color: white; | ||
} | } | ||
/* Stable (bleu) */ | /* Stable (bleu) */ | ||
.badge-stable { | .badge-stable { | ||
background: | background: #3b82f6; | ||
color: white; | color: white; | ||
} | } | ||
/* Deprecated (rouge) */ | /* Deprecated (rouge) */ | ||
.badge-deprecated { | .badge-deprecated { | ||
background: | background: #ef4444; | ||
color: white; | color: white; | ||
} | } | ||
/* WIP (violet | /* WIP (violet clair) */ | ||
.badge-wip { | .badge-wip { | ||
background: | background: #8b5cf6; | ||
color: white; | color: white; | ||
} | } | ||
/* Experimental (rose) */ | /* Experimental (rose/magenta) */ | ||
.badge-experimental { | .badge-experimental { | ||
background: | background: #ec4899; | ||
color: white; | color: white; | ||
} | } | ||
/* Info (cyan) */ | /* Info (cyan) */ | ||
.badge-info { | .badge-info { | ||
background: | background: #06b6d4; | ||
color: white; | color: white; | ||
} | } | ||
/* Warning ( | /* Warning (orange vif) */ | ||
.badge-warning { | .badge-warning { | ||
background: | background: #f59e0b; | ||
color: #1f2937; | color: #1f2937; | ||
font-weight: 700; | |||
} | } | ||
/* Success (vert clair) */ | /* Success (vert clair) */ | ||
.badge-success { | .badge-success { | ||
background: | background: #22c55e; | ||
color: white; | color: white; | ||
} | } | ||
/* Danger (rouge vif) */ | /* Danger (rouge vif) */ | ||
.badge-danger { | .badge-danger { | ||
background: | background: #f43f5e; | ||
color: white; | color: white; | ||
} | } | ||
/* Premium (or) */ | /* Premium (or) */ | ||
.badge-premium { | .badge-premium { | ||
background: | background: #f59e0b; | ||
color: #1f2937; | color: #1f2937; | ||
font-weight: 700; | |||
} | } | ||
/* Dark (noir) */ | /* Dark (noir) */ | ||
.badge-dark { | .badge-dark { | ||
background: | background: #1f2937; | ||
color: white; | color: white; | ||
} | } | ||
/* Light ( | /* Light (gris clair) */ | ||
.badge-light { | .badge-light { | ||
background: | background: #e5e7eb; | ||
color: #1f2937; | color: #1f2937; | ||
font-weight: 700; | |||
} | |||
/* Discord (bleu Discord) */ | |||
.badge-discord { | |||
background: #5865F2; | |||
color: white; | |||
} | |||
/* Twitter/X (noir) */ | |||
.badge-twitter { | |||
background: #14171A; | |||
color: white; | |||
} | |||
/* Instagram */ | |||
.badge-instagram { | |||
background: #E1306C; | |||
color: white; | |||
} | |||
/* === Icônes === */ | |||
/* Icône AVANT le texte */ | |||
.badge > span:first-child, | |||
.badge > i:first-child { | |||
margin-right: 0; | |||
margin-left: 0.6em; | |||
} | } | ||
/* | /* Icône APRÈS le texte */ | ||
.badge > span:last-child:not(:first-child), | |||
.badge > i:last-child:not(:first-child) { | |||
margin-left: 0; | |||
margin-right: 0.6em; | |||
} | |||
.badge .fa | /* Alignement vertical des icônes FontAwesome */ | ||
.badge . | .badge .fa, | ||
.badge . | .badge .fas, | ||
.badge .far, | |||
font-size: | .badge .fab { | ||
font-size: 0.6em; | |||
vertical-align: middle; | vertical-align: middle; | ||
line-height: 1; | |||
display: inline-block; | |||
} | } | ||
/* | /* Correction pour l'extension FontAwesome qui génère des <span> */ | ||
.badge | .badge span[class*="fa-"] { | ||
margin-left: 0.6em; | |||
. | |||
margin-right: 0; | margin-right: 0; | ||
} | } | ||
.badge span[class*="fa-"]:first-child { | |||
margin-left: 0; | |||
margin-right: 0.6em; | |||
} | |||
/* === Variantes de taille === */ | /* === Variantes de taille === */ | ||
.badge-sm { | .badge-sm { | ||
font-size: 0. | font-size: 0.55em; | ||
padding: 0. | padding: 0.4em 0.75em; | ||
} | } | ||
.badge-lg { | .badge-lg { | ||
font-size: 0. | font-size: 0.75em; | ||
padding: 0. | padding: 0.6em 1.1em; | ||
} | } | ||
.badge-xl { | .badge-xl { | ||
font-size: 0. | font-size: 0.85em; | ||
padding: 0. | padding: 0.7em 1.3em; | ||
} | } | ||
/* === Variantes de style === */ | /* === Variantes de style === */ | ||
/* Badge outline */ | /* Badge outline */ | ||
.badge-outline { | .badge-outline { | ||
background: transparent | background: transparent; | ||
border: 2px solid currentColor; | border: 2px solid currentColor; | ||
font-weight: 700; | |||
} | } | ||
.badge-outline.badge-beta { | |||
.badge- | color: #7c3aed; | ||
border- | border-color: #7c3aed; | ||
} | } | ||
.badge-outline.badge-alpha { | |||
color: #f97316; | |||
border-color: #f97316; | |||
} | |||
.badge- | .badge-outline.badge-new { | ||
color: #10b981; | |||
border-color: #10b981; | |||
} | } | ||
.badge-outline.badge-info { | |||
color: #06b6d4; | |||
border-color: #06b6d4; | |||
} | } | ||
.badge- | .badge-outline.badge-stable { | ||
color: #3b82f6; | |||
border-color: #3b82f6; | |||
} | } | ||
/* Badge pill (arrondi complet) */ | |||
.badge-pill { | |||
border-radius: 50px; | |||
} | } | ||
/* | /* Badge carré */ | ||
.badge-square { | |||
border-radius: 0; | |||
.badge { | |||
} | } | ||
/* === Effets hover spéciaux === */ | |||
.badge- | .badge-glow:hover { | ||
box-shadow: 0 0 15px currentColor; | |||
} | } | ||
/* === | /* === Classes utilitaires === */ | ||
.badge | /* Pas de majuscules */ | ||
.badge-no-uppercase { | |||
text-transform: none; | |||
} | } | ||
/* | /* Pas d'effet hover */ | ||
.badge-no-hover:hover { | |||
filter: none; | |||
transform: none; | |||
} | } | ||
.badge- | /* Texte en gras normal */ | ||
.badge-normal { | |||
font-weight: 500; | |||
} | } | ||
/* === | /* === Icônes FontAwesome === */ | ||
.badge .fa-solid, | |||
.badge- | .badge .fa-regular, | ||
.badge .fa-brands { | |||
margin-right: 0.45em; | |||
font-size: 1.1em; | |||
vertical-align: middle; | |||
} | } | ||
/* | /* Icône seule - version simplifiée */ | ||
.badge- | .badge-icon-only .fa-solid, | ||
.badge-icon-only .fa-regular, | |||
.badge-icon-only .fa-brands { | |||
margin-right: 0; | |||
} | } | ||