Avatar: Bfm Pro Badge Extra Large

Info

Disabled state is available for all variants.

<div class="sds-avatar centeredBgi -extraLarge -badgeVisible" style="background-image: url(../../media/snet/avatars/avatarUser.png)">

    <span class="sds-avatar__circle">

        <span class="sds-icon sds-icon-business"></span>

    </span>

</div>
{% if externalImg %}
	{% set mediaPath = "" %}
{% endif %}
<{{ eltType}} {% if eltType === "a" %} href="{{ href }}"{%- endif -%} class="{{ namespace }}avatar centeredBgi{% for mod in modifiers %} {{ mod }}{% endfor %}{% for mod in classes %} {{ mod }}{% endfor %}"{% if img %} style="background-image: url({{ (mediaPath + img) | path }})"{% endif%} {% for attrKey, attr in attrs %} {{ attrKey }}="{{ attr }}"{% endfor %}>
	{% if bfm %}
	<div class="{{ namespace }}avatar__text">Pro</div>
	{% endif %}
	{% if circleBadge %}
		<span class="{{ namespace }}avatar__circle">
			{% if logo %}
				<img src="{{ (mediaPath+logo) | path }}" alt="">
			{% else %}
				<span class="{{ namespace }}icon {{ namespace }}{{ icon }}"></span>
			{% endif %}
		</span>
	{% endif %}
	{% if bank %}
		<span class="{{ namespace }}icon {{ namespace }}{{ icon }}"></span>
	{% endif %}
	{% if nopic %}
	{% render "@nopic-adviser" %}
	{% endif %}
</{{ eltType}}>
  • Content:
    /* variables specific to current element */
    
    $avatar-pro-label-top-padding: 0.16em;
    $avatar-pro-label-bottom-padding: 0.25em;
    
    .#{$namespace}avatar {
    
    	/* Save root element context for easy access if nesting is needed */
    
    	$self: &;
    
    	/* properties of current element  + media queries */
    
    	display: inline-flex;
    	width: map-deep-get($token-sizes-unit-map,"40");
    	height: map-deep-get($token-sizes-unit-map,"40");
    	border-radius: map-deep-get($token-radius-map,"circle");
    	position: relative;
    	overflow: hidden;
    	flex-shrink: 0;
    
    	/* 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 */
    
    	// avatar__childElement
    
    	&__circle {
    
    		position: absolute;
    		right: 0;
    		bottom: 0;
    		width: map-deep-get($token-sizes-unit-map, "16");
    		height: map-deep-get($token-sizes-unit-map, "16");
    		@include custom-prop-fallback("background-color", "sys-color-background-status-info-100");
    		@include custom-prop-fallback("color", "sys-color-text-primary-vivid",true,true);
    		border-radius: map-deep-get($token-radius-map, "circle");
    		display: flex;
    		align-items: center;
    		justify-content: center;
    
    		[class*="icon"] {
    
    			line-height: 0;
    			position: relative;
    			top: -1px;
    			color: inherit;
    
    			&::before {
    				font-size: 12px;
    			}
    
    		}
    
    		IMG {
    
    			width: 100%;
    			height: 100%;
    			object-fit: cover;
    
    		}
    
    	}
    
    
    	/* modifiers */
    
    
    
    	// avatar -small
    
    	&.-xtraSmall {
    
    		// follows same logic as base element
    
    		width: map-deep-get($token-sizes-unit-map,"24");
    		height: map-deep-get($token-sizes-unit-map,"24");
    
    	}
    
    	&.-small {
    
    		// follows same logic as base element
    
    		width: $avatar-small-dimensions-global;
    		height: $avatar-small-dimensions-global;
    
    		#{$self}__text {font-size: 6px;}
    
    		#{$self}__circle {
    
    			bottom: -(map-deep-get($token-spacer-unit-map, "2"));
    			right: -(map-deep-get($token-spacer-unit-map, "2"));
    
    		}
    
    		font-size: $font-size-base;
    
    		*::before {
    			font-size: inherit;
    		}
    
    	}
    
    	// avatar -medium
    	&.-medium {
    
    		// follows same logic as base element
    
    		#{$self}__text {font-size: 8px;}
    
    	}
    
    	// avatar -large
    	&.-large {
    
    		// follows same logic as base element
    
    		width: $avatar-large-dimensions-global;
    		height: $avatar-large-dimensions-global;
    
    		#{$self}__text {
    			font-size: 10px;
    		}
    
    		#{$self}__circle {
    
    			bottom: map-deep-get($token-spacer-unit-map, "2");
    			right: map-deep-get($token-spacer-unit-map, "2");
    
    		}
    
    	}
    
    	// avatar -extraLarge
    	&.-extraLarge {
    
    		// follows same logic as base element
    
    		width: map-deep-get($token-sizes-unit-map,"120");
    		height: map-deep-get($token-sizes-unit-map,"120");
    
    		#{$self}__circle {
    
    			bottom: map-deep-get($token-spacer-unit-map, "8");
    			right: map-deep-get($token-spacer-unit-map, "12");
    
    		}
    
    	}
    
    	&.-disabled {
    
    		filter: grayscale(100%);
    
    		#{$self}__text {
    			background-color: map-deep-get($token-color-grayscale-map,"1000");
    		}
    
    	}
    
    	&.-badgeVisible,
    	&.-userBank {
    
    		overflow: visible;
    
    	}
    
    	&.-bank {
    
    		display: flex;
    		align-items: center;
    		justify-content: center;
    		@include custom-prop-fallback("background-color", "sys-color-background-primary-15");
    		@include custom-prop-fallback("color", "sys-color-text-primary-vivid");
    
    	}
    
    	/* random parent element */
    	/* 
    	*
    	*   Syntax : .randomParentElt & {}
    	*
    	*/
    
    	/* Pseudo Classes */
    
    	&:hover {
    		@media (hover: hover) {
    
    		}
    	}
    
    	&:focus {
    	}
    
    	&:active {
    	}
    
    	&:focus,
    	&:active {
    	}
    
    }
  • URL: /components/raw/snet-avatar/_avatar.scss
  • Filesystem Path: components/snet/atoms/avatar/_avatar.scss
  • Size: 3.6 KB