Badge: Primary Large

No notes defined.

<div class="sds-badge badge -badgePrimary -badgeLg">

    badge
</div>
<div class="{{ namespace }}badge badge{% for mod in modifiers %} {{ mod }}{% endfor %}{% for mod in classes %} {{ mod }}{% endfor %}">
	{% if iconLeft %}
		<span class="{{ namespace }}icon {{ namespace }}{{ iconLeft }}"></span>
	{% endif %}
	{{ text }}
</div>
  • Content:
    /* variables specific to current element */
    
    $element-specific-variables: "";
    
    .#{$namespace}badge {
    
    	/* Save root element context for easy access if nesting is needed */
    
    	$self: &;
    
    
    	/* properties of current element  + media queries */
    
    	/* 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 */
    
    	// badge__childElement
    	&__childElement {
    
    		// follows same logic as parent
    
    	}
    
    
    	/* modifiers */
    
    	// badge -info10
    	&.-badgePrimary {
    
    		@include custom-prop-fallback("background-color", "comp-badge-primary-background-color");
    		@include custom-prop-fallback("color", "comp-badge-primary-text-color");
    
    		&.-badgeMuted {
    
    			@include custom-prop-fallback("background-color", "comp-badge-primary-muted-background-color");
    			@include custom-prop-fallback("color", "comp-badge-primary-muted-text-color");
    
    		}
    
    		&.-badgeTonal {
    
    			@include custom-prop-fallback("background-color", "comp-badge-primary-tonal-background-color");
    			@include custom-prop-fallback("color", "comp-badge-primary-text-color");
    
    		}
    
    	}
    	&.-badgeHighlight {
    
    		@include custom-prop-fallback("background-color", "comp-badge-highlight-background-color");
    		@include custom-prop-fallback("color", "comp-badge-highlight-text-color");
    
    		&.-badgeMuted {
    
    			@include custom-prop-fallback("background-color", "comp-badge-highlight-muted-background-color");
    			@include custom-prop-fallback("color", "comp-badge-highlight-muted-text-color");
    
    		}
    
    	}
    	&.-badgeSuccess {
    
    		@include custom-prop-fallback("background-color", "comp-badge-success-background-color");
    		@include custom-prop-fallback("color", "comp-badge-success-text-color");
    
    		&.-badgeMuted {
    
    			@include custom-prop-fallback("background-color", "comp-badge-success-muted-background-color");
    			@include custom-prop-fallback("color", "comp-badge-success-muted-text-color");
    
    		}
    
    	}
    	&.-badgeDanger {
    
    		@include custom-prop-fallback("background-color", "comp-badge-danger-background-color");
    		@include custom-prop-fallback("color", "comp-badge-danger-text-color");
    
    		&.-badgeMuted {
    
    			@include custom-prop-fallback("background-color", "comp-badge-danger-muted-background-color");
    			@include custom-prop-fallback("color", "comp-badge-danger-muted-text-color");
    
    		}
    
    	}
    	&.-badgeWarning {
    
    		@include custom-prop-fallback("background-color", "comp-badge-warning-background-color");
    		@include custom-prop-fallback("color", "comp-badge-warning-text-color");
    
    		&.-badgeMuted {
    
    			@include custom-prop-fallback("background-color", "comp-badge-warning-muted-background-color");
    			@include custom-prop-fallback("color", "comp-badge-warning-muted-text-color");
    
    		}
    
    	}
    	&.-badgeInfo {
    
    		@include custom-prop-fallback("background-color", "comp-badge-info-background-color");
    		@include custom-prop-fallback("color", "comp-badge-info-text-color");
    
    		&.-badgeMuted {
    
    			@include custom-prop-fallback("background-color", "comp-badge-info-muted-background-color");
    			@include custom-prop-fallback("color", "comp-badge-info-muted-text-color");
    
    		}
    
    	}
    	&.-badgeNeutral {
    
    		@include custom-prop-fallback("background-color", "comp-badge-neutral-background-color");
    		@include custom-prop-fallback("color", "comp-badge-neutral-text-color");
    
    		&.-badgeMuted {
    
    			@include custom-prop-fallback("background-color", "comp-badge-neutral-muted-background-color");
    			@include custom-prop-fallback("color", "comp-badge-neutral-muted-text-color");
    
    		}
    
    	}
    	&.-info10 {
    
    		@include custom-prop-fallback("background-color", "comp-badge-info-muted-background-color");
    		@include custom-prop-fallback("color", "comp-badge-info-muted-text-color");
    
    	}
    
    	&.-warning10 {
    
    		@include custom-prop-fallback("background-color", "comp-badge-warning-muted-background-color");
    		@include custom-prop-fallback("color", "comp-badge-warning-muted-text-color");
    
    	}
    
    	// badge -fade120
    	&.-fade10 {
    
    		@include custom-prop-fallback("background-color", "comp-badge-neutral-muted-background-color");
    		@include custom-prop-fallback("color", "comp-badge-neutral-muted-text-color");
    
    	}
    
    	// badge -success100
    	&.-success10 {
    
    		@include custom-prop-fallback("background-color", "comp-badge-success-muted-background-color");
    		@include custom-prop-fallback("color", "comp-badge-success-muted-text-color");
    
    	}
    
    	// badge -fade100
    	// @TODO badge BG got changed, class name will have to be adapted at some point
    	&.-fade100 {
    
    		@include custom-prop-fallback("background-color", "comp-badge-primary-tonal-background-color");
    		@include custom-prop-fallback("color", "comp-badge-primary-text-color");
    
    	}
    
    	&.-primary10 {
    
    		@include custom-prop-fallback("background-color", "comp-badge-danger-muted-background-color");
    		@include custom-prop-fallback("color", "comp-badge-danger-muted-text-color");
    
    	}
    
    	&.-secondary10 {
    
    		@include custom-prop-fallback("background-color", "comp-badge-primary-muted-background-color");
    		@include custom-prop-fallback("color", "comp-badge-primary-muted-text-color");
    	}
    
    	&.-highlight10 {
    
    		@include custom-prop-fallback("background-color", "comp-badge-highlight-muted-background-color");
    		@include custom-prop-fallback("color", "comp-badge-highlight-muted-text-color");
    
    	}
    
    	&.-primary100 {
    
    		@include custom-prop-fallback("background-color", "sys-color-background-secondary-100");
    		@include custom-prop-fallback("color", "sys-color-text-neutral-inverse");
    		@include custom-prop-fallback("background-image", "sys-color-background-secondary-gradient");
    
    	}
    
    	&.-primary100Bg {
    
    		@include custom-prop-fallback("background-color", "comp-badge-danger-background-color");
    		@include custom-prop-fallback("color", "comp-badge-danger-text-color");
    
    	}
    
    	&.-success100Bg {
    
    		@include custom-prop-fallback("background-color", "comp-badge-success-background-color");
    		@include custom-prop-fallback("color", "comp-badge-success-text-color");
    
    	}
    
    	&.-badgeSmall,
    	&.-badgeSm,
    	&.-small {
    
    		@extend %textHelperSmall;
    		@include custom-prop-fallback("height", "comp-badge-small-height");
    		@include custom-prop-fallback("padding-left", "comp-badge-small-inset-h");
    		@include custom-prop-fallback("padding-right", "comp-badge-small-inset-h");
    		@include custom-prop-fallback("border-radius", "comp-badge-small-border-radius");
    		@extend %textBold;
    
    	}
    
    	&.-badgeLarge,
    	&.-badgeLg,
    	&.-large {
    
    		@extend %textBodyLg;
    		@include custom-prop-fallback("height", "comp-badge-large-height");
    		@include custom-prop-fallback("padding-left", "comp-badge-large-inset-h");
    		@include custom-prop-fallback("padding-right", "comp-badge-large-inset-h");
    		@include custom-prop-fallback("border-radius", "comp-badge-large-border-radius");
    		@include custom-prop-fallback("gap", "comp-badge-large-inline");
    
    		.#{$namespace}icon {
    
    			&::before {
    
    				@include custom-prop-fallback("font-size", "comp-badge-large-icon-size");
    
    			}
    
    		}
    
    	}
    	
    	&.-stock {
    
    		position: relative;
    		padding-top: map-deep-get($token-spacer-unit-map, "8");
    		padding-bottom: map-deep-get($token-spacer-unit-map, "8");
    		//padding-left: map-deep-get($token-spacer-unit-map, "24");
    		line-height: 1.145;
    		height: auto;
    
    		/* @TODO rewrite this shite sometime soon */
    		.#{$namespace}icon {
    
    			height: 0;
    			position: relative;
    			left: -9px;
    			margin-right: -7px;
    			top: 50%;
    			transform: translateY(-50%);
    
    			&::before {
    
    				display: block;
    				margin-top: -14px;
    
    			}
    
    		}
    		
    	}
    	
    	&.-badgeBlock {
    
    		justify-content: center;
    		width: 100%;
    
    	}
    
    	/* random parent element */
    	/*
    	*
    	*   Syntax : .randomParentElt & {}
    	*
    	*/
    
    	/* Pseudo Classes */
    
    	&:hover {
    		@media (hover: hover) {
    
    		}
    	}
    
    	&:focus {
    	}
    
    	&:active {
    	}
    
    	&:focus,
    	&:active {
    	}
    
    }
  • URL: /components/raw/badge/_badge.scss
  • Filesystem Path: components/base-components/atoms/badge/_badge.scss
  • Size: 7.8 KB