No notes defined.
<span class="sds-radioDot " aria-hidden="true"></span>
{%- if input -%}
<input value="{{ value }}" type="radio" name="{{ name }}" class="sr-only{% for mod in inputModifiers %} {{ mod }}{% endfor %}" id="{{ id }}"{% if disabled %} disabled{% endif %}{% if checked %} checked{% endif %}{% for attrKey, attr in attrs %} {{ attrKey }}="{{ attr }}"{% endfor %}>
{%- endif -%}
<span class="{{ namespace }}radioDot {% for mod in modifiers %} {{ mod }}{% endfor %}{% for mod in classes %} {{ mod }}{% endfor %}" aria-hidden="true"></span>
/* variables specific to current element */
$radio-dot-dimensions: $circle-dimensions-global;
$radio-dot-inner-circle-dimensions: map-deep-get($token-sizes-unit-map, "16");
.#{$namespace}radioDot {
/* Save root element context for easy access if nesting is needed */
$self: &;
/* properties of current element + media queries */
position: relative;
@include custom-prop-fallback("background-color","comp-radio-background-color");
border: $border-width*2 solid;
@include custom-prop-fallback("border-color", "comp-radio-border-color");
cursor: pointer;
width: $radio-dot-dimensions;
height: $radio-dot-dimensions;
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
border-radius: map-deep-get($token-radius-map, "circle");
/* Pseudo Elements */
&::before {
content: "";
opacity: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
@include custom-prop-fallback("background-color","comp-radio-checked-dot-background-color");
width: $radio-dot-inner-circle-dimensions;
height: $radio-dot-inner-circle-dimensions;
border-radius: inherit;
}
&::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 */
// radioDot__childElement
&__childElement {
// follows same logic as parent
}
/* modifiers */
// disabled
&.-isDisabled,
INPUT[disabled] + &, INPUT:disabled + & {
@include radioInputDisabled();
}
&.-isDisabled:checked,
INPUT[disabled]:checked + &, INPUT:disabled:checked + & {
@include radioInputDisabledChecked();
}
// radioDot -active
INPUT:checked + &,
&.-active {
@include radioInputChecked();
}
&.-isLoading {
&::before {
@extend %skeletonUnit;
opacity: 1 !important;
background-color: transparent !important;
border-radius: inherit;
}
INPUT[disabled]:not(:checked) + & {
&::before {
width: 100%;
height: 100%;
}
}
INPUT[disabled]:checked + & {
&::before {
background-color: transparent !important;
}
}
}
/* random parent element */
/*
*
* Syntax : .randomParentElt & {}
*
*/
/* Pseudo Classes */
&:hover {
@media (hover: hover) {
@include radioInputHovered();
}
}
INPUT:active:not([disabled]) + &,
INPUT:focus-visible + & {
@include radioInputFocused();
}
&:active {
}
&:focus,
&:active {
}
}