Speechbubble arrow position can be changes throught the popover data attributes
The following 4 attributes control the arrow's position (always centered)
<div class="sds-speechbubble" data-popper-placement="bottom">
<div class="sds-stackLg">
<div class="sds-stackXs">
<div class="h3 sds-colorInherit">Bonjour, je suis MIA</div>
<p>Ton assistant financier personnel, entièrement gratuit, qui t'aide à classer tes recettes et dépenses de manière simple et intelligente.</p>
</div>
<button type="button" class="sds-btn -btnSecondary -btnInverse">
<span class="sds-btn__text">Découvrir</span>
<span class="sds-icon sds-icon-chevrondown"></span>
</button>
</div>
<div class="sds-speechbubble__arrow" aria-hidden="true" data-toggle-visibility-at="lg"></div>
</div>
<div class="{{ namespace }}speechbubble{% for mod in modifiers %} {{ mod }}{% endfor %}{% for mod in classes %} {{ mod }}{% endfor %}" data-popper-placement="bottom">
<div class="{{ namespace }}stackLg">
<div class="{{ namespace }}stackXs">
<div class="h3 {{ namespace }}colorInherit">Bonjour, je suis MIA</div>
<p>Ton assistant financier personnel, entièrement gratuit, qui t'aide à classer tes recettes et dépenses de manière simple et intelligente.</p>
</div>
{% render "@btn-secondary-inverse--icon-right",{
text: "Découvrir",
icon: "icon-chevrondown"
},true %}
</div>
<div class="{{ namespace }}speechbubble__arrow" aria-hidden="true" data-toggle-visibility-at="lg"></div>
</div>
/* variables specific to current element */
$element-specific-variables: "";
.#{$namespace}speechbubble {
/* Save root element context for easy access if nesting is needed */
$self: &;
/* properties of current element + media queries */
@include custom-prop-fallback("background-color","sys-color-background-highlight-100");
@include custom-prop-fallback("color","sys-color-text-neutral-inverse");
border-radius: map-deep-get($token-radius-map, "24");
padding: map-deep-get($token-spacer-inset-map, "md");
position: relative;
@include media-breakpoint-up("lg") {
padding: map-deep-get($token-spacer-inset-map, "lg");
}
/* 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 */
// speechbubble__childElement
&__arrow {
position: absolute;
display: block;
width: $popover-arrow-width;
height: $popover-arrow-height;
margin: 0 $popover-border-radius;
&::before,
&::after {
position: absolute;
display: block;
content: "";
border-color: transparent;
border-style: solid;
}
}
/* modifiers */
// speechbubble -altStyle
&.-altStyle {
// follows same logic as base element
}
/* modifiers use popover data atttribute styles for arrow positioning */
&[data-popper-placement="top"],
&[data-popper-placement="bottom"] {
> [class*="arrow"] {
left: 50%;
transform: translateX(-50%);
margin: 0;
}
}
&[data-popper-placement="left"],
&[data-popper-placement="right"] {
> [class*="arrow"] {
top: 50%;
transform: translateY(-50%);
margin: 0;
}
}
/* random parent element */
/*
*
* Syntax : .randomParentElt & {}
*
*/
/* Pseudo Classes */
&:hover {
@media (hover: hover) {
}
}
&:focus {
}
&:active {
}
&:focus,
&:active {
}
}