The row-cols-#{$breakpoint}-#{$size} bootstrap classes are set on the sds-spotSelectList element. By using the row-cols classes, we can retain bootstrap's row/col flexibility inside the module, without having to adapt the col-* classes.
The row class always needs to be set by default. row-xs and row-sm classes can be added as modifiers as well to adapt the gutter width between columns.
Add the classes sds-spotSelectList__firstItem and sds-spotSelectList__lastItem to the LI elements for their spotSelect child elements to retain their border-radius when sibling elements are not visible.
<div class="sds-spotSelectListWrapper">
<ul class="sds-spotSelectList list-unstyled row row-cols-md-2 row-cols-xl-3 is-invalid">
<li class="col">
<div class="sds-spotSelect sds-showCustomIndicatorHover ">
<input type="radio" id="list-1" class="sds-spotSelect__radioInput sr-only" value="" name="radio-name">
<div data-scope-wrapper="box" data-scope="flat" class="sds-spotSelect__body">
<div class="sds-spotSelect__content">
<span class="sds-radioDot sds-spotSelect__checkItem" aria-hidden="true"></span>
<img src="../../media/illustrative-icons/sdsillu-differentcardsb.svg" alt="">
<div class="sds-spotSelect__inner sds-stackMd">
<div class="sds-spotSelect__text">
<div class="sds-spotSelect__title">
<div class="sds-textSemiBold">
<label class="sds-spotSelect__checkItemLabel" for="list-1">Gérer le quotidien</label>
</div>
</div>
<p><label class="sds-spotSelect__checkItemLabel" for="list-1">Ouvrir un compte courant et epargne ou obtenir une nouvelle carte bancaire.</label></p>
</div>
</div>
</div>
</div>
</div>
</li>
<li class="col">
<div class="sds-spotSelect sds-showCustomIndicatorHover ">
<input type="radio" id="list-2" class="sds-spotSelect__radioInput sr-only" value="" name="radio-name">
<div data-scope-wrapper="box" data-scope="flat" class="sds-spotSelect__body">
<div class="sds-spotSelect__content">
<span class="sds-radioDot sds-spotSelect__checkItem" aria-hidden="true"></span>
<img src="../../media/illustrative-icons/sdsillu-differentcardsb.svg" alt="">
<div class="sds-spotSelect__inner sds-stackMd">
<div class="sds-spotSelect__text">
<div class="sds-spotSelect__title">
<div class="sds-textSemiBold">
<label class="sds-spotSelect__checkItemLabel" for="list-2">Gérer le quotidien</label>
</div>
</div>
<p><label class="sds-spotSelect__checkItemLabel" for="list-2">Ouvrir un compte courant et epargne ou obtenir une nouvelle carte bancaire.</label></p>
</div>
</div>
</div>
</div>
</div>
</li>
<li class="col">
<div class="sds-spotSelect sds-showCustomIndicatorHover ">
<input type="radio" id="list-3" class="sds-spotSelect__radioInput sr-only is-invalid" value="" name="radio-name">
<div data-scope-wrapper="box" data-scope="flat" class="sds-spotSelect__body">
<div class="sds-spotSelect__content">
<span class="sds-radioDot sds-spotSelect__checkItem" aria-hidden="true"></span>
<img src="../../media/illustrative-icons/sdsillu-differentcardsb.svg" alt="">
<div class="sds-spotSelect__inner sds-stackMd">
<div class="sds-spotSelect__text">
<div class="sds-spotSelect__title">
<div class="sds-textSemiBold">
<label class="sds-spotSelect__checkItemLabel" for="list-3">Gérer le quotidien</label>
</div>
</div>
<p><label class="sds-spotSelect__checkItemLabel" for="list-3">Ouvrir un compte courant et epargne ou obtenir une nouvelle carte bancaire.</label></p>
</div>
</div>
</div>
</div>
</div>
</li>
<li class="col">
<div class="sds-spotSelect sds-showCustomIndicatorHover ">
<input type="radio" id="list-4" class="sds-spotSelect__radioInput sr-only" value="" name="radio-name">
<div data-scope-wrapper="box" data-scope="flat" class="sds-spotSelect__body">
<div class="sds-spotSelect__content">
<span class="sds-radioDot sds-spotSelect__checkItem" aria-hidden="true"></span>
<img src="../../media/illustrative-icons/sdsillu-differentcardsb.svg" alt="">
<div class="sds-spotSelect__inner sds-stackMd">
<div class="sds-spotSelect__text">
<div class="sds-spotSelect__title">
<div class="sds-textSemiBold">
<label class="sds-spotSelect__checkItemLabel" for="list-4">Gérer le quotidien</label>
</div>
</div>
<p><label class="sds-spotSelect__checkItemLabel" for="list-4">Ouvrir un compte courant et epargne ou obtenir une nouvelle carte bancaire.</label></p>
</div>
</div>
</div>
</div>
</div>
</li>
<li class="col">
<div class="sds-spotSelect sds-showCustomIndicatorHover ">
<input type="radio" id="list-5" class="sds-spotSelect__radioInput sr-only" value="" name="radio-name">
<div data-scope-wrapper="box" data-scope="flat" class="sds-spotSelect__body">
<div class="sds-spotSelect__content">
<span class="sds-radioDot sds-spotSelect__checkItem" aria-hidden="true"></span>
<img src="../../media/illustrative-icons/sdsillu-differentcardsb.svg" alt="">
<div class="sds-spotSelect__inner sds-stackMd">
<div class="sds-spotSelect__text">
<div class="sds-spotSelect__title">
<div class="sds-textSemiBold">
<label class="sds-spotSelect__checkItemLabel" for="list-5">Gérer le quotidien</label>
</div>
</div>
<p><label class="sds-spotSelect__checkItemLabel" for="list-5">Ouvrir un compte courant et epargne ou obtenir une nouvelle carte bancaire.</label></p>
</div>
</div>
</div>
</div>
</div>
</li>
<li class="col">
<div class="sds-spotSelect sds-showCustomIndicatorHover ">
<input type="radio" id="list-6" class="sds-spotSelect__radioInput sr-only" value="" name="radio-name">
<div data-scope-wrapper="box" data-scope="flat" class="sds-spotSelect__body">
<div class="sds-spotSelect__content">
<span class="sds-radioDot sds-spotSelect__checkItem" aria-hidden="true"></span>
<img src="../../media/illustrative-icons/sdsillu-differentcardsb.svg" alt="">
<div class="sds-spotSelect__inner sds-stackMd">
<div class="sds-spotSelect__text">
<div class="sds-spotSelect__title">
<div class="sds-textSemiBold">
<label class="sds-spotSelect__checkItemLabel" for="list-6">Gérer le quotidien</label>
</div>
</div>
<p><label class="sds-spotSelect__checkItemLabel" for="list-6">Ouvrir un compte courant et epargne ou obtenir une nouvelle carte bancaire.</label></p>
</div>
</div>
</div>
</div>
</div>
</li>
</ul>
<div class="sds-spotSelectListWrapper__errorMessage invalid-feedback">
error message
</div>
</div>
<div class="{{ namespace }}spotSelectListWrapper{% for mod in modifiers %} {{ mod }}{% endfor %}{% for mod in classes %} {{ mod }}{% endfor %}">
<ul class="{{ namespace }}spotSelectList list-unstyled row{% for mod in rowModifiers %} {{ mod }}{% endfor %}{% for mod in rowClasses %} {{ mod }}{% endfor %}">
<li class="col">
{% render "@spot-select",{
spotSelectID: "list-1"
},true %}
</li>
<li class="col">
{% render "@spot-select",{
spotSelectID: "list-2"
},true %}
</li>
<li class="col">
{% render "@spot-select",{
spotSelectID: "list-3",
state: "is-invalid",
error: true
},true %}
</li>
<li class="col">
{% render "@spot-select",{
spotSelectID: "list-4"
},true %}
</li>
<li class="col">
{% render "@spot-select",{
spotSelectID: "list-5"
},true %}
</li>
<li class="col">
{% render "@spot-select",{
spotSelectID: "list-6"
},true %}
</li>
</ul>
<div class="{{ namespace }}spotSelectListWrapper__errorMessage invalid-feedback">
error message
</div>
</div>
/* variables specific to current element */
$element-specific-variables: "";
.#{$namespace}spotSelectListWrapper {
/* Save root element context for easy access if nesting is needed */
$self: &;
/* properties of current element + media queries */
/* Pseudo Elements */
&::before {
}
&::after {
}
/*
Include elements that are linked to the current element but have to reside at the root level of the stylesheet
(e.g: keyframes)
*/
@at-root {
}
/* children - write selector in full in comments in order to facilitate search */
// spotSelectListWrapper__errorMessage
&__errorMessage {
// follows same logic as parent
margin-top: map-deep-get($token-spacer-unit-map, "16");
}
/* modifiers */
// spotSelectListWrapper -altStyle
&.-altStyle {
// follows same logic as base element
}
/* random parent element */
/*
*
* Syntax : .randomParentElt & {}
*
*/
/* Pseudo Classes */
&:hover {
@media (hover: hover) {
}
}
&:focus {
}
&:active {
}
&:focus,
&:active {
}
}