Chip: Loading

No notes defined.

<button type="button" class="sds-chip  -isLoading" disabled>
    <span>1S</span>
</button>
<button type="button" class="{{ namespace }}chip {% for mod in modifiers %} {{ mod }}{% endfor %}{% for mod in classes %} {{ mod }}{% endfor %}"{% if disabled %} disabled{% endif %}>
	<span>{{ text | safe }}</span>
</button>
  • Content:
    /* variables specific to current element */
    
    $element-specific-variables: "";
    
    .#{$namespace}chip {
    
    	/* Save root element context for easy access if nesting is needed */
    
    	$self: &;
    
    	/* properties of current element  + media queries */
    
    	border-radius: map-deep-get($design-tokens, "comp-chip-border-radius");
    	padding-inline: map-deep-get($design-tokens, "comp-chip-inset-h");
    	padding-block: map-deep-get($design-tokens, "comp-chip-inset-v");
    	font-weight: map-deep-get($design-tokens, "sys-font-weight-semibold");
    	font-size: map-deep-get($design-tokens, "sys-font-size-helper-small");
    	min-height: map-deep-get($token-spacer-unit-map, "24");
    	@include custom-prop-fallback("color", "comp-chip-enabled-text-color");
    	@include custom-prop-fallback("background-color", "comp-chip-enabled-background-color");
    
    	/* 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 */
    
    	// chip__child
    	SPAN {
    		position: relative;
    		z-index: z("low");
    	}
    
    
    	/* modifiers */
    
    	&[disabled] {
    
    		@include custom-prop-fallback("background-color", "comp-button-secondary-disabled-background-color");
    		@include custom-prop-fallback("color", "comp-button-secondary-disabled-text-color");
    
    	}
    
    	// chip -chipGhost
    	&.-chipGhost {
    		background-color: transparent;
    	}
    
    	// chip -isActive
    	&.-isActive {
    
    		@include custom-prop-fallback("color", "comp-chip-selected-text-color");
    		@include custom-prop-fallback("background-color", "comp-chip-selected-background-color");
    
    		&:hover {
    			@media (hover: hover) {
    				@include custom-prop-fallback("background-color", "comp-chip-selected-background-color");
    			}
    		}
    	}
    
    	&.-isLoading {
    
    		position: relative;
    		overflow: hidden;
    
    		&::after {
    			content: "";
    			@include btn-loading-state();
    			background-image: map-deep-get($design-tokens, "comp-chip-enabled-loading-background-color");
    		}
    
    		&.-isActive {
    
    			&::after {
    				background-image: map-deep-get($design-tokens, "comp-chip-selected-loading-background-color");
    			}
    		}
    	}
    
    	/* random parent element */
    	/* 
    	*
    	*   Syntax : .randomParentElt & {}
    	*
    	*/
    
    	/* Pseudo Classes */
    
    	&:hover {
    		@media (hover: hover) {
    			@include custom-prop-fallback("background-color", "comp-chip-hovered-background-color");
    		}
    	}
    
    	&:focus-visible {
    		outline: map-deep-get($design-tokens, "comp-chip-pressed-border-width") solid !important;
    		@include custom-prop-fallback("outline-color", "comp-chip-pressed-border-color","true","true");
    		outline-offset: map-deep-get($design-tokens, "comp-chip-pressed-border-offset-inset-h") !important;
    	}
    
    	&:active {
    	}
    
    	&:focus,
    	&:active {
    	}
    
    }
  • URL: /components/raw/chip/_chip.scss
  • Filesystem Path: components/token-based/actions-and-inputs/chip/_chip.scss
  • Size: 2.8 KB