openeuropa / bootstrap-component-library

Openeuropa Bootstrap Component Library
https://oelibrary.netlify.app/
MIT License
14 stars 9 forks source link

Badge background is not applied #561

Closed Aporie closed 2 months ago

Aporie commented 9 months ago

Bcl badges do not allow customizing the background anymore.

@see https://github.com/openeuropa/bootstrap-component-library/blob/development/src/components/bcl-badge/badge.html.twig#L34

Proposed solution:

{% set _classes = _classes|merge(['text-bg-' ~ _background, 'bg-' ~ _background]) %}

Aporie commented 2 months ago

This issue can be closed. After new investigation, text-bg has been introduced in Bootstrap 5.2: https://getbootstrap.com/docs/5.3/components/badge/#background-colors

I think there might have been a temporary mismatch between the provided version of bootstrap and this change, or it's our custom theme which override bg-VAR which resulted into having all badges in different colors.

Anyway. Issue is not from BCL-bootstrap anymore.