No notes defined.
<div class="sds-radio custom-control custom-radio">
<input value="radio-value" type="radio" name="radio-name-checked" class="sr-only custom-control-input " id="checked-radio" checked><span class="sds-radioDot sds-radio__shape" aria-hidden="true"></span>
<label class="custom-control-label" for="checked-radio">
Check this custom radio
</label>
</div>
<div class="{{ namespace }}radio custom-control custom-radio">
{% render "@radio-dot",{
classes: radioDotClasses,
inputModifiers: ["custom-control-input",state],
id: id,
checked: checked,
disabled: disabled,
name: inputName
},true %}
<label class="custom-control-label" for="{{ id }}">
{{ text }}
</label>
{% if hint %}
<p class="{{ namespace }}radio__hint {{ namespace }}textHelperSmall">Radio hint</p>
{% endif %}
{% if error %}
<p class="{{ namespace }}radio__error invalid-feedback">Error message</p>
{% endif %}
</div>
/* variables specific to current element */
.#{$namespace}radio {
/* Save root element context for easy access if nesting is needed */
$self: &;
/* properties of current element + media queries */
cursor: pointer;
width: fit-content;
/* 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 */
// radio__shape
&__shape {
// follows same logic as parent
position: absolute;
left: 0;
top: 0;
}
// radio__error
&__error,
&__hint {
margin-top: 0;
padding-left: $custom-control-label-shape-space;
}
&__hint {
@include custom-prop-fallback("color", "sys-color-text-primary-muted");
}
/* modifiers */
// radio -active
/* random parent element */
/*
*
* Syntax : .randomParentElt & {}
*
*/
/* Pseudo Classes */
&:hover {
@media (hover: hover) {
#{$self}__shape {
@include radioInputHovered();
}
}
}
&:focus {
}
&:active {
}
&:focus,
&:active {
}
}