Table: Default

No notes defined.

<div data-sds-gradient-overflow-h>
    <div data-sds-gradient-overflow-h-wrapper>
        <div data-sds-gradient-overflow-h-inner>
            <div class="sds-table table-responsive">
                <table class="table">
                    <caption>Caption of table</caption>
                    <thead>
                        <tr>
                            <th>
                                <div class="h4">Header</div>
                            </th>
                            <th>
                                <div class="h4">Header</div>
                            </th>
                            <th>
                            </th>
                            <th>
                                <div class="h4">Header</div>
                            </th>
                            <th>
                                <div class="h4">Header</div>
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>
                                <div>Eur</div>
                            </td>
                            <td>
                                <div>USD</div>
                            </td>
                            <td>
                                <div>Dollar USA</div>
                            </td>
                            <td>
                                <div>1,0812</div>
                            </td>
                            <td>
                                <div>1,0924</div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div>Eur</div>
                            </td>
                            <td>
                                <div>GBP</div>
                            </td>
                            <td>
                                <div>Livre Sterling</div>
                            </td>
                            <td>
                                <div>0,8499</div>
                            </td>
                            <td>
                                <div>0,8589</div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div>39,44%</div>
                            </td>
                            <td>
                                <div>CHF</div>
                            </td>
                            <td>
                                <div>Franc Suisse</div>
                            </td>
                            <td>
                                <div>0,9616</div>
                            </td>
                            <td>
                                <div>0,9716</div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div>39,44%</div>
                            </td>
                            <td>
                                <div>SEK</div>
                            </td>
                            <td>
                                <div>Courrone Suédoise</div>
                            </td>
                            <td>
                                <div>11,2734</div>
                            </td>
                            <td>
                                <div>11,4095</div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div>39,44%</div>
                            </td>
                            <td>
                                <div>NOK</div>
                            </td>
                            <td>
                                <div>Courrone Norvégienne</div>
                            </td>
                            <td>
                                <div>11,5017</div>
                            </td>
                            <td>
                                <div>11,6406</div>
                            </td>
                        </tr>
                    </tbody>
                    <tfoot>
                        <tr>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td>
                                <div class="sds-textSemiBold sds-textBodyLg">Footer</div>
                            </td>
                            <td>
                                <div class="sds-textSemiBold sds-textBodyLg">Footer</div>
                            </td>
                        </tr>
                    </tfoot>
                </table>
            </div>
        </div>
    </div>
</div>
<div data-{{ namespace }}gradient-overflow-h>
	<div data-{{ namespace }}gradient-overflow-h-wrapper>
		<div data-{{ namespace }}gradient-overflow-h-inner>
			<div class="{{ namespace }}table{% for mod in modifiers %} {{ mod }}{% endfor %}{% for mod in classes %} {{ mod }}{% endfor %}">
				<table class="table{% for mod in modifiersTable %} {{ mod }}{% endfor %}">
					<caption>{{ caption }}</caption>
					<thead>
					<tr>
						<th>
							<div class="h4">Header</div>
						</th>
						<th>
							<div class="h4">Header</div>
						</th>
						<th>
						</th>
						<th>
							<div class="h4">Header</div>
						</th>
						<th>
							<div class="h4">Header</div>
						</th>
					</tr>
					</thead>
					<tbody>
					<tr>
						<td>
							<div>Eur</div>
						</td>
						<td>
							<div>USD</div>
						</td>
						<td>
							<div>Dollar USA</div>
						</td>
						<td>
							<div>1,0812</div>
						</td>
						<td>
							<div>1,0924</div>
						</td>
					</tr>
					<tr>
						<td>
							<div>Eur</div>
						</td>
						<td>
							<div>GBP</div>
						</td>
						<td>
							<div>Livre Sterling</div>
						</td>
						<td>
							<div>0,8499</div>
						</td>
						<td>
							<div>0,8589</div>
						</td>
					</tr>
					<tr>
						<td>
							<div>39,44%</div>
						</td>
						<td>
							<div>CHF</div>
						</td>
						<td>
							<div>Franc Suisse</div>
						</td>
						<td>
							<div>0,9616</div>
						</td>
						<td>
							<div>0,9716</div>
						</td>
					</tr>
					<tr>
						<td>
							<div>39,44%</div>
						</td>
						<td>
							<div>SEK</div>
						</td>
						<td>
							<div>Courrone Suédoise</div>
						</td>
						<td>
							<div>11,2734</div>
						</td>
						<td>
							<div>11,4095</div>
						</td>
					</tr>
					<tr>
						<td>
							<div>39,44%</div>
						</td>
						<td>
							<div>NOK</div>
						</td>
						<td>
							<div>Courrone Norvégienne</div>
						</td>
						<td>
							<div>11,5017</div>
						</td>
						<td>
							<div>11,6406</div>
						</td>
					</tr>
					</tbody>
					<tfoot>
					<tr>
						<td></td>
						<td></td>
						<td></td>
						<td>
							<div class="{{ namespace }}textSemiBold {{ namespace }}textBodyLg">Footer</div>
						</td>
						<td>
							<div class="{{ namespace }}textSemiBold {{ namespace }}textBodyLg">Footer</div>
						</td>
					</tr>
					</tfoot>
				</table>
			</div>
		</div>
	</div>
</div>
  • Content:
    /* variables specific to current element */
    
    $element-specific-variables: "";
    
    .#{$namespace}table {
    
    	/* Save root element context for easy access if nesting is needed */
    
    	$self: &;
    
    	/* properties of current element  + media queries */
    	flex-grow: 1;
    
    	/* 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 */
    
    	// table__childElement
    	&__childElement {
    
    		// follows same logic as parent
    
    	}
    
    	TH {
    
    		padding-top: 0 !important;
    		vertical-align: bottom !important;
    		border-bottom-width: $table-border-width !important;
    
    	}
    
    	TBODY {
    		
    		TD {
    
    			border: 0;
    
    		}	
    
    		&::before,
    		&::after {
    
    			content: "";
    			display: block !important;
    			height: map-deep-get($token-spacer-unit-map, "16") !important;
    			width: 100% !important;
    
    		}
    
    	}
    
    	TFOOT {
    
    		TH,TD {
    
    			padding-bottom: 0 !important;
    			vertical-align: bottom !important;
    			border-top: $table-border-width solid !important;
    			@include custom-prop-fallback("border-top-color", "sys-color-border-primary-moderate", true, true);
    			border-bottom: 0;
    
    		}
    
    	}
    
    	CAPTION {
    
    		@extend %textHelper3xs;
    		@include custom-prop-fallback("color","sys-color-text-primary-muted");
    		padding-left: $table-cell-padding-x;
    
    	}
    
    	/* modifiers */
    
    	// table -verticalBorder
    	&.-verticalBorder {
    
    		// follows same logic as base element
    		
    		TH, TD {
    			border: 0 !important;
    		}
    		
    		THEAD {
    			
    			TH + TH {
    
    				border-left: $border-width solid;
    				@include custom-prop-fallback("border-left-color", "sys-color-border-primary-moderate", true, true);
    
    			}
    			
    			TH {
    
    				padding-bottom: map-deep-get($token-spacer-inset-map, "xl") !important;
    
    			}
    			
    		}
    
    		TBODY {
    
    			&::before,
    			&::after {
    
    				content: none;
    
    			}
    
    			TR:first-of-type {
    
    				TH, TD {
    
    					padding-top: 0 !important;
    
    				}
    
    			}
    
    			TR:last-of-type {
    
    				TH, TD {
    
    					padding-bottom: 0 !important;
    
    				}
    
    			}
    
    			TH + TD,
    			TD + TD {
    
    				border-left: $border-width solid !important;
    				@include custom-prop-fallback("border-left-color", "sys-color-border-primary-moderate", true, true);
    
    			}
    
    		}
    		
    	}
    
    	&.-hasBorder {
    
    		TBODY {
    
    			tr {
    
    				td {
    
    					border-bottom: $border-width solid;
    					@include custom-prop-fallback("border-bottom-color", "sys-color-border-primary-subtle");
    
    				}
    
    				&:last-child {
    
    					td {
    
    						border-bottom: none;
    
    					}
    
    				}
    
    			}
    
    		}
    
    	}
    
    	&.-hasHeaderLeft {
    
    		TBODY {
    
    			&::before,
    			&::after {
    
    				content: none;
    
    			}
    
    		}
    
    		TBODY,
    		TFOOT {
    
    			tr {
    
    				th {
    
    					border-right: $border-width solid;
    					@include custom-prop-fallback("border-right-color", "sys-color-border-primary-moderate");
    					border-bottom: 0 !important;
    
    				}
    
    				td {
    
    					&:nth-child(2){
    
    						padding-left: $table-cell-padding-x * 3 !important;
    
    					}
    
    				}
    
    			}
    
    		}
    
    	}
    
    	/* random parent element */
    	/* 
    	*
    	*   Syntax : .randomParentElt & {}
    	*
    	*/
    
    	/* Pseudo Classes */
    
    	&:hover {
    		@media (hover: hover) {
    
    		}
    	}
    
    	&:focus {
    	}
    
    	&:active {
    	}
    
    	&:focus,
    	&:active {
    	}
    
    }
  • URL: /components/raw/table/_table.scss
  • Filesystem Path: components/base-components/molecules/table/_table.scss
  • Size: 3.2 KB