Skip to content

fix(Input): use fr-message classes instead of fr-error/valid/info-text#492

Open
inscomssb wants to merge 1 commit into
codegouvfr:mainfrom
inscomssb:fix/input-message-css-classes
Open

fix(Input): use fr-message classes instead of fr-error/valid/info-text#492
inscomssb wants to merge 1 commit into
codegouvfr:mainfrom
inscomssb:fix/input-message-css-classes

Conversation

@inscomssb
Copy link
Copy Markdown

Problem

The Input component was using legacy DSFR CSS classes for state messages:

  • .fr-error-text
  • .fr-valid-text
  • .fr-info-text

These classes cause icon misalignment when the message spans multiple lines (see #480).

Fix

Replace with the classes recommended by the official DSFR documentation:

  • .fr-message .fr-message--error
  • .fr-message .fr-message--valid
  • .fr-message .fr-message--info

All three modifier classes are already present in src/fr/generatedFromCss/classNames.ts and correctly typed.

Closes #480

The DSFR documentation recommends using .fr-message with .fr-message--error,
.fr-message--valid and .fr-message--info instead of the legacy monolithic
class names. The old classes caused icon misalignment on multi-line messages.

Closes codegouvfr#480
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.

Icône de message d’erreur/validation/info mal positionnée dans le composant Input

1 participant