« Modèle:ButtonLink/styles.css » : différence entre les versions
De Nefald
Autres actions
Aucun résumé des modifications Balise : Révoqué |
Aucun résumé des modifications Balise : Révoqué |
||
| Ligne 1 : | Ligne 1 : | ||
/* ============================================ | /* ============================================ | ||
WRAPPER PRINCIPAL | |||
============================================ */ | ============================================ */ | ||
.button-link-wrapper { | .button-link-wrapper { | ||
min-height: | min-height: 80px; | ||
border-radius: 12px; | border-radius: 12px; | ||
overflow: hidden; | overflow: hidden; | ||
| Ligne 49 : | Ligne 12 : | ||
background: #6c757d; | background: #6c757d; | ||
display: flex; | display: flex; | ||
align-items: | align-items: stretch; /* ⬅️ CHANGÉ */ | ||
} | } | ||
| Ligne 59 : | Ligne 21 : | ||
/* ============================================ | /* ============================================ | ||
CONTENU PRINCIPAL | |||
============================================ */ | ============================================ */ | ||
.button-link- | .button-link-content { | ||
width: 100%; | width: 100%; | ||
display: flex; /* ⬅️ AJOUTÉ */ | |||
align-items: center; /* ⬅️ AJOUTÉ */ | |||
} | } | ||
.button-link- | .button-link-content a { | ||
color: white !important; | |||
text-decoration: none !important; | |||
display: flex; | |||
align-items: center; | |||
width: 100%; | width: 100%; | ||
padding: 1rem; | |||
gap: 1rem; /* ⬅️ Espacement entre image et texte */ | |||
/* | |||
} | } | ||
.button-link-content a:hover, | |||
.button-link-content a:visited { | |||
color: white !important; | |||
.button-link-content | |||
} | } | ||
| Ligne 115 : | Ligne 54 : | ||
justify-content: center; | justify-content: center; | ||
flex-shrink: 0; | flex-shrink: 0; | ||
width: | width: 120px; /* ⬅️ Réduit */ | ||
height: | height: 100%; /* ⬅️ Prend toute la hauteur disponible */ | ||
overflow: hidden; | overflow: hidden; | ||
background: transparent; | background: transparent; | ||
} | } | ||
| Ligne 134 : | Ligne 66 : | ||
width: 100%; | width: 100%; | ||
height: 100%; | height: 100%; | ||
padding: 0.5rem; /* ⬅️ Petit padding interne */ | |||
} | } | ||
| Ligne 145 : | Ligne 78 : | ||
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1)); | filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1)); | ||
} | } | ||
/* ============================================ | /* ============================================ | ||
TEXTE DU BOUTON | |||
============================================ */ | ============================================ */ | ||
.button-link- | .button-link-text { | ||
flex: 1; /* ⬅️ Prend l'espace restant */ | |||
display: flex; | |||
flex-direction: column; | flex-direction: column; | ||
text-align: | justify-content: center; | ||
text-align: left; | |||
min-width: 0; /* ⬅️ Permet au texte de se réduire si besoin */ | |||
} | } | ||
.button-link-text strong { | |||
font-size: 1.1em; | |||
display: block; | |||
margin-bottom: 0.25rem; | |||
.button-link- | |||
} | } | ||
/* ============================================ | /* ============================================ | ||
POSITIONNEMENT QR CODE | |||
============================================ */ | ============================================ */ | ||
.button-link--imagepos- | /* QR Code à GAUCHE (défaut) */ | ||
flex-direction: row | .button-link--imagepos-left .button-link-content a { | ||
flex-direction: row; | |||
} | } | ||
.button-link--imagepos-left .button-link-text { | |||
text-align: left; | |||
.button-link- | |||
} | } | ||
.button-link- | /* QR Code à DROITE */ | ||
.button-link--imagepos-right .button-link-content a { | |||
flex-direction: row-reverse; | |||
} | } | ||
.button-link--imagepos-right .button-link-text { | |||
text-align: right; | |||
.button-link- | |||
text- | |||
} | } | ||
/* | /* QR Code CENTRÉ (pas de texte) */ | ||
.button-link--imagepos-center .button-link- | .button-link--imagepos-center .button-link-content a { | ||
justify-content: center; | justify-content: center; | ||
} | } | ||
.button-link--imagepos- | .button-link--imagepos-center .button-link-image-container { | ||
width: 200px; /* ⬅️ Plus grand quand centré */ | |||
} | } | ||
.button-link--imagepos- | .button-link--imagepos-center .button-link-text { | ||
display: none; | |||
} | } | ||
/* ============================================ | /* ============================================ | ||
ALIGNEMENT DU BOUTON | |||
ALIGNEMENT | |||
============================================ */ | ============================================ */ | ||
| Ligne 304 : | Ligne 156 : | ||
margin-left: auto; | margin-left: auto; | ||
margin-right: 0; | margin-right: 0; | ||
} | |||
/* Masquer l'icône de lien externe */ | |||
.button-link-content a.external::after { | |||
display: none !important; | |||
} | } | ||
Version du 16 janvier 2026 à 08:08
/* ============================================
WRAPPER PRINCIPAL
============================================ */
.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: #6c757d;
display: flex;
align-items: stretch; /* ⬅️ CHANGÉ */
}
.button-link-wrapper:hover {
transform: translateY(-2px);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
/* ============================================
CONTENU PRINCIPAL
============================================ */
.button-link-content {
width: 100%;
display: flex; /* ⬅️ AJOUTÉ */
align-items: center; /* ⬅️ AJOUTÉ */
}
.button-link-content a {
color: white !important;
text-decoration: none !important;
display: flex;
align-items: center;
width: 100%;
padding: 1rem;
gap: 1rem; /* ⬅️ Espacement entre image et texte */
}
.button-link-content a:hover,
.button-link-content a:visited {
color: white !important;
}
/* ============================================
CONTENEUR IMAGE
============================================ */
.button-link-image-container {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
width: 120px; /* ⬅️ Réduit */
height: 100%; /* ⬅️ Prend toute la hauteur disponible */
overflow: hidden;
background: transparent;
}
.button-link-image-container .mw-file-description {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
padding: 0.5rem; /* ⬅️ Petit padding interne */
}
.button-link-image-container img {
max-width: 100%;
max-height: 100%;
width: auto !important;
height: auto !important;
object-fit: contain;
display: block;
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}
/* ============================================
TEXTE DU BOUTON
============================================ */
.button-link-text {
flex: 1; /* ⬅️ Prend l'espace restant */
display: flex;
flex-direction: column;
justify-content: center;
text-align: left;
min-width: 0; /* ⬅️ Permet au texte de se réduire si besoin */
}
.button-link-text strong {
font-size: 1.1em;
display: block;
margin-bottom: 0.25rem;
}
/* ============================================
POSITIONNEMENT QR CODE
============================================ */
/* QR Code à GAUCHE (défaut) */
.button-link--imagepos-left .button-link-content a {
flex-direction: row;
}
.button-link--imagepos-left .button-link-text {
text-align: left;
}
/* QR Code à DROITE */
.button-link--imagepos-right .button-link-content a {
flex-direction: row-reverse;
}
.button-link--imagepos-right .button-link-text {
text-align: right;
}
/* QR Code CENTRÉ (pas de texte) */
.button-link--imagepos-center .button-link-content a {
justify-content: center;
}
.button-link--imagepos-center .button-link-image-container {
width: 200px; /* ⬅️ Plus grand quand centré */
}
.button-link--imagepos-center .button-link-text {
display: none;
}
/* ============================================
ALIGNEMENT DU BOUTON
============================================ */
.button-link--align-left {
width: 450px;
max-width: 100%;
margin-right: auto;
margin-left: 0;
}
.button-link--align-center {
width: 450px;
max-width: 100%;
margin-left: auto;
margin-right: auto;
}
.button-link--align-right {
width: 450px;
max-width: 100%;
margin-left: auto;
margin-right: 0;
}
/* Masquer l'icône de lien externe */
.button-link-content a.external::after {
display: none !important;
}