ckrybus / crispy-bulma

Bulma template pack for django-crispy-forms
MIT License
27 stars 7 forks source link

Inline error text <p> tag styled using the wrong class #17

Closed jayqi closed 1 month ago

jayqi commented 2 months ago

When displaying a field error inline, the following <p> tag HTML is added:

https://github.com/ckrybus/crispy-bulma/blob/2e9abb011f0b5b9cf0dbc8a6def1cec8a44568c1/crispy_bulma/templates/bulma/field.html#L56-L59

The is-danger class used here is not correct. is-danger doesn't actually do anything for a <p> tag.

Instead, Bulma has the has-text-danger CSS helper class for changing the text color in a general container element. (docs)

Using:

ckrybus commented 1 month ago

Hi @jayqi, thanks for reporting this!

is-danger doesn't actually do anything for a <p> tag.

Visually it is the same, by default the text is rendered in red, so it does work (at least inside a form).

The is-danger class used here is not correct.

The bulma docs display the form errors using is-danger, see the screenshot below:

bulma