Product Card

No notes defined.

<!-- Default -->
<div class="sds-productCard">
    <div class="sds-productCard__img">
        <img class="img-fluid" src="../../media/illustrative-icons/sdsillu-variouspayments.svg" alt="">
    </div>
    <div class="sds-productCardContent">
        <div class="h4">Gestion des cartes</div>
        <p class="sds-productCard__text">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
    </div>
</div>

<!-- Small -->
<div class="sds-productCard -small">
    <div class="sds-productCard__img">
        <img class="img-fluid" src="../../media/illustrative-icons/sdsillu-variouspayments.svg" alt="">
    </div>
    <div class="sds-productCardContent">
        <div class="h4">Gestion des cartes</div>
        <p class="sds-productCard__text">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
    </div>
</div>

{% if externalImg %}
	{% set mediaPath = "" %}
{% endif %}
<div class="{{ namespace }}productCard{% for mod in modifiers %} {{ mod }}{% endfor %}{% for mod in classes %} {{ mod }}{% endfor %}">
	<div class="{{ namespace }}productCard__img">
		<img class="img-fluid" src="{{ (mediaPath+img) | path }}" alt="">
	</div>
	<div class="{{ namespace }}productCardContent">
		<div class="h4">{{ title }}</div>
		<p class="{{ namespace }}productCard__text">{{ text }}</p>
	</div>
</div>
  • Content:
    /* variables specific to current element */
    
    $product-card-img-dimensions: map-deep-get($token-sizes-unit-map, "80");
    $product-card-img-dimensions-sm: map-deep-get($token-sizes-unit-map, "48");
    
    .#{$namespace}productCard {
    
    	/* Save root element context for easy access if nesting is needed */
    
    	$self: &;
    
    	/* properties of current element  + media queries */
    
    	@include spacer-component-inline("md");
    	display: flex;
    	align-items: center;
    
    	/* 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 */
    
    	// productCard__img
    	&__img {
    
    		width: $product-card-img-dimensions;
    		height: $product-card-img-dimensions;
    		flex-shrink: 0;
    
    	}
    
    	// productCard__text
    	&__text {
    
    		// follows same logic as parent
    
    		margin-top: map-deep-get($token-spacer-unit-map, "2");
    
    	}
    
    
    	/* modifiers */
    
    	// productCard -altStyle
    	&.-small {
    
    		#{$self}__img {
    
    			width: $product-card-img-dimensions-sm;
    			height: $product-card-img-dimensions-sm;
    
    		}
    
    	}
    
    	/* random parent element */
    	/* 
    	*
    	*   Syntax : .randomParentElt & {}
    	*
    	*/
    
    	/* Pseudo Classes */
    
    	&:hover {
    		@media (hover: hover) {
    
    		}
    	}
    
    	&:focus {
    	}
    
    	&:active {
    	}
    
    	&:focus,
    	&:active {
    	}
    
    }
  • URL: /components/raw/snet-product-card/_product-card.scss
  • Filesystem Path: components/snet/molecules/product-card/_product-card.scss
  • Size: 1.4 KB