Skip to content

Button primary secondary fix : Fix des boutons et unification 3 couleurs (violet/blanc/rouge) - #53

Merged
raynaldlao merged 5 commits into
masterfrom
button-primary-secondary-fix
Jul 25, 2026
Merged

Button primary secondary fix : Fix des boutons et unification 3 couleurs (violet/blanc/rouge)#53
raynaldlao merged 5 commits into
masterfrom
button-primary-secondary-fix

Conversation

@raynaldlao

Copy link
Copy Markdown
Owner

Hiérarchie des boutons — unification 3 couleurs (violet/blanc/rouge)

Contexte

Standardisation de tous les boutons du blog sur une hiérarchie cohérente à 3 niveaux : Primary (violet), Secondary (neutre), Danger (rouge). Suppression des dérives visuelles et harmonisation des hovers sur l'ensemble des templates.

Changements

CSS — base.css

  • .btn-secondary : couleur unifiée --on-background (neutre), supprime les hacks spécifiques par contexte
  • .btn-secondary:hover : fond color-mix(primary 8%, transparent) — identique partout (dialogs, account-card, nav)
  • .btn:hover:not(.btn-secondary):not(.btn-danger) : empêche le a:hover global (color: var(--primary)) d'écraser le texte blanc des boutons primaires
  • .btn-dialog : suppression du violet sur le bouton Cancel (retour au neutre standard)

CSS — account.css

  • Suppression des overrides .account-card .btn.btn-secondary (couleur violette dérivée)

CSS — article.css

  • [Edit] hover : aligné sur [Delete] (fond color-mix + brightness) — plus de simple underline
  • Comment inline buttons conservés en ghost (hors système .btn)

CSS — profile.css

  • .profile-actions : width: fit-content; margin: 0 auto; en mobile + breakpoint 22.5em → 37em
  • .avatar-actions : nouveau wrapper pour upload/remove photo, min-width: 12rem
  • .email-edit-btn : transform: translateY(1px) pour corriger l'alignement baseline
  • .profile-actions .btn : padding unifié avec secondary/danger (compact)

Templates — login.html, registration.html

  • Submit buttons : class="btn full-width" ajouté (manquait, rendu en texte brut sans style)

Templates — article_detail.html

  • [Cancel] dans les traductions JSON du template + pattern brackets (_t('[Cancel]'))
  • [Edit] ajouté aux traductions JSON (clé manquante → fallback anglais)
  • Boutons Edit/Delete : classes corrigées (danger pour delete)

Templates — profile.html

  • "Manage Users" : class="btn" (primary, violet)
  • Delete Account : class="btn btn-danger"
  • Avatar buttons : wrapper .avatar-actions

JavaScript — comment-reply.js

  • _t('Cancel')_t('[Cancel]') (aligné sur le pattern brackets)

Traductions — messages.po / messages.mo

  • Ajout : msgid "[Cancel]"msgstr "[Annuler]"

Notes

  • Les boutons inline dans les commentaires ([Edit], [Delete], [Reply], [Cancel]) restent hors système .btn — choix délibéré (ghost, contexte différent)
  • color-mix() utilisé sans fallback : déjà jugé acceptable (<1% navigateurs concernés en 2026)

… tightened, primary styling added to the Manage Users button, Sign In and Create Account now use the `.btn` class, padding unified in `.profile-actions`, avatar buttons wrapped in `.avatar-actions` for consistent width, mobile breakpoint raised to 37em, and mobile stacking switched to a fit‑content column layout
…hierarchy clarified: a `.btn:hover` rule now overrides the default `a:hover` color so primary buttons keep their proper styling, the Edit button on the article detail page is promoted to primary, and Delete drops its redundant `.btn-secondary` since `.btn-danger` already defines its role
…ows as `[Annuler]`, the restore button switches back to `[Modifier]`, both strings added to the translation files, primary button hover on `<a>` elements is fixed so link hover no longer overrides it and the override excludes `.btn-secondary` and `.btn-danger` to keep their intended hover behavior
…nt. All `.btn-secondary` buttons now share the same subtle primary‑tinted hover, the dialog‑specific override is removed, the account‑card violet override is dropped, and the `.comment-edit-toggle` hover behavior is aligned with `.comment-delete-btn` for a uniform interaction pattern
… The `.email-edit-btn` now uses `transform: translateY(1px)` for proper vertical positioning, and `inline-flex` with `align-items: center` ensures the text stays perfectly centered
@raynaldlao
raynaldlao requested a review from hlargitte July 25, 2026 12:55
@raynaldlao raynaldlao self-assigned this Jul 25, 2026

@hlargitte hlargitte left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@raynaldlao
raynaldlao merged commit 734cd0c into master Jul 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants