Radio: With Text Input

No notes defined.

<div class="d-flex flex-wrap align-items-center sds-staticGapMd">
    <div class="sds-radio custom-control custom-radio">
        <input value="radio-value" type="radio" name="radio-name" class="sr-only custom-control-input " id="radio-with-text-input"><span class="sds-radioDot  sds-radio__shape" aria-hidden="true"></span>
        <label class="custom-control-label" for="radio-with-text-input">
            Other radio option:
        </label>

    </div>
    <div class="form-group flex-grow-1">

        <label for="text-input-radio-choice" class="sds-label sr-only">
            Hidden text input label more specific than visible radio label

        </label>

        <div class="sds-input">
            <input id="text-input-radio-choice" class="sds-input form-control" type="text" placeholder="{ Placeholder }" value="">

        </div>
    </div>
</div>
<div class="d-flex flex-wrap align-items-center {{ namespace }}staticGapMd">
	{% render "@radio",{
		text: radioText,
		id: radioID
	},true %}
	<div class="form-group flex-grow-1">
		{% render "@label",{
			classes: ["sr-only"],
			text: "Hidden text input label more specific than visible radio label",
			labelFor: "text-input-radio-choice"
		},true %}
		{% render "@input-text",{
			id: "text-input-radio-choice",
			hint: false
		},true %}
	</div>
</div>
  • Content:
    /* 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 */
    
    
    	/* random parent element */
    	/* 
    	*
    	*   Syntax : .randomParentElt & {}
    	*
    	*/
    
    	/* Pseudo Classes */
    
    	&:hover {
    		@media (hover: hover) {
    			#{$self}__shape {
    				@include radioInputHovered();
    			}
    		}
    	}
    
    	&:focus {
    	}
    
    	&:active {
    	}
    
    	&:focus,
    	&:active {
    	}
    
    }
  • URL: /components/raw/radio/_radio.scss
  • Filesystem Path: components/token-based/actions-and-inputs/input/radio/_radio.scss
  • Size: 1.1 KB