Avatar

Info

Disabled state is available for all variants.

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

</div>

<!-- Nopic -->
<div class="sds-avatar centeredBgi -medium">

    <div class="sds-noPic">
        <svg width="630" height="631" viewBox="0 0 630 630" fill="none" xmlns="http://www.w3.org/2000/svg">
            <rect width="630" height="630" transform="translate(0 0.304688)" fill="#F0F6FF" />
            <g opacity=".32">
                <path fill-rule="evenodd" clip-rule="evenodd" d="M314.998 219.472c31.751 0 57.5 25.749 57.5 57.5 0 19.33-9.544 36.436-24.177 46.861 25.75 13.975 43.348 43.652 43.348 77.722 0 4.915-3.699 8.965-8.465 9.519l-1.118.064H247.919c-5.292 0-9.583-4.29-9.583-9.583 0-34.07 17.593-63.744 43.338-77.725-14.634-10.42-24.176-27.526-24.176-46.858 0-31.754 25.744-57.5 57.5-57.5Zm-.351 115.001c-27.165.194-50.228 22.586-55.841 52.808l-.407 2.402-.321 2.289h39.061l7.131-48.206c.848-5.744 5.098-8.829 9.592-9.248l.785-.045Zm10.638 7.975.256 1.278 7.287 48.246h39.09l-.312-2.288c-4.585-29.96-26.211-52.791-52.37-55.032l-2.19-.138-1.915-.044c4.436.081 8.821 2.738 10.154 7.978Zm-10.287-103.81c-21.17 0-38.333 17.165-38.333 38.334 0 21.168 17.163 38.333 38.333 38.333 21.165 0 38.333-17.168 38.333-38.333 0-21.166-17.168-38.334-38.333-38.334Z" fill="#4D6E90" />
            </g>
        </svg>
    </div>

</div>

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

</div>

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

</div>

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

</div>

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

</div>

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

</div>

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

    <div class="sds-avatar__text">Pro</div>

</div>

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

    <div class="sds-avatar__text">Pro</div>

</div>

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

    <div class="sds-avatar__text">Pro</div>

</div>

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

    <div class="sds-avatar__text">Pro</div>

</div>

<!-- Bfm Extra Large Disabled -->
<div class="sds-avatar centeredBgi -extraLarge -disabled" style="background-image: url(../../media/snet/avatars/avatarUser.png)">

    <div class="sds-avatar__text">Pro</div>

</div>

<!-- Bfm Pro Badge -->
<div class="sds-avatar centeredBgi -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>

<!-- Bfm Pro Badge Small -->
<div class="sds-avatar centeredBgi -small -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>

<!-- Bfm Pro Badge Large -->
<div class="sds-avatar centeredBgi -large -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>

<!-- Bfm Pro Badge Extra Large -->
<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>

<!-- Tooltip -->
<div class="sds-avatar centeredBgi -medium" style="background-image: url(../../media/snet/avatars/avatarUser.png)" data-toggle="tooltip" data-placement="top" title="Avatar tooltip">

</div>

<!-- Small Tooltip -->
<div class="sds-avatar centeredBgi -small" style="background-image: url(../../media/snet/avatars/avatarUser.png)" data-toggle="tooltip" data-placement="top" title="Avatar tooltip">

</div>

<!-- User Bank -->
<div class="sds-avatar centeredBgi -medium -userBank" style="background-image: url(../../media/snet/avatars/avatarUser.png)">

    <span class="sds-avatar__circle">

        <img src="../../media/logos/logo-spuerkeess.png" alt="">

    </span>

</div>

<!-- Bank No Img -->
<div class="sds-avatar centeredBgi -small -bank">

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

</div>

<!-- Bank Img -->
<div class="sds-avatar centeredBgi -small -bank" style="background-image: url(../../media/logos/logo-spuerkeess.png)">

    <span class="sds-icon sds-false"></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