Search
 
SCRIPT & CODE EXAMPLE
 

CSS

mapping and each in sass

$font-sizes: (
  900: 3rem,
  700: 1.5rem,
  400: 1.125rem,
);

@each $shade, $value in $font-sizes {
  .fs-#{$shade} {
    font-size: $value;
  }
}

/* 
Compiled CSS: 
.fs-900 { font-size: 1.125rem }
.fs-700 { font-size: 1.5rem }
.fs-400 { font-size: 3rem }
*/
Comment

PREVIOUS NEXT
Code Example
Css ::  
:: css custom properties 
Css ::  
Css :: how to chose tailwindcss while creating larevel project 
Css :: box shadow all sides 
Css ::  
Css :: list in html css 
Css ::  
Css ::  
Css :: cypress element css 
:: flex flow 
Css ::  
Css :: css linkup 
Css ::  
Css :: text shadow css 
:: backdrop filter css 
Css ::  
:: two classes css modules 
Css :: css witdh 
:: css change class name start with 
::  
:: zoom in to picture on html css 
:: overflow-wrap: anywhere 
Css ::  
:: how to saturate colors in css 
Css :: Responsive Web Design with HTML5 and CSS 
::  
:: card tailwind css 
Css :: ie showing close icon 
Css :: javascript index value 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =