- Issue created by @plits
- 🇫🇷France S3b0uN3t Nantes
Hello,
Thank you for using the dsfr4drupal theme!
The
bg_boxes
property is not intended to manage all card options.
We have chosen to update its type to an enumeration to limit its use to the purposes mentioned by the DSFR (See "Fonds et encadrés").We apologize if this restriction caused regressions in your theme implementation.
We also prefer to limit the
variant
property to the card size as is the case for the majority of components.There are so many possible options in cards that we don't plan to manage them all by properties today.
To use a card in download mode, it would be preferable to define the class yourself in the attributes property:
{% set attributes = attributes.addClass(['fr-card--download']) %} {{ include('dsfr4drupal:card', ...) }}
or
{{ include('dsfr4drupal:card', { 'attributes': attributes.addClass(['fr-card--download']), ... }, with_context=false) }}
or
{{ include('dsfr4drupal:card', { 'attributes': create_attribute({'class': ['fr-card--download']}), ... }, with_context=false) }}
Regards,
- 🇫🇷France plits
Hello,
Makes sense, will refactor with this usage then.
Have a nice day.