Created
November 22, 2022 00:48
-
-
Save pochitax/6a34285f89d119ab0c3ff6586f07f0c7 to your computer and use it in GitHub Desktop.
Ejemplo sass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* variables si se ve al momento de compilar */ | |
/* generales */ | |
body { | |
color: #ff0; | |
background-color: white; | |
font-size: 60px; | |
} | |
.rectangulo { | |
border: 1px solid #ff0; | |
padding: 60px; | |
margin-bottom: 60px; | |
width: 60px; | |
height: calc(100vh - 60px); | |
} | |
.rectangulo .link { | |
/* <div class="rectangulo"><a class="link"> */ | |
color: white; | |
} | |
.rectangulo.borde-rojo { | |
/* <div class="rectangulo borde-rojo"> */ | |
border-color: #f00; | |
} | |
.cuadrado { | |
border: 1px solid #ff0; | |
padding: 60px; | |
margin-bottom: 60px; | |
width: 60px; | |
height: 60px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// variables no se ve | |
/* variables si se ve al momento de compilar */ | |
$color1: #ff0; //fuchsia; | |
$color2: white; | |
$size: 60px; | |
// Mixins | |
@mixin borde { | |
border: 1px solid $color1; | |
padding: $size; | |
margin-bottom: $size; | |
} | |
/* generales */ | |
body { | |
color: $color1; | |
background-color: $color2; | |
font-size: $size; | |
} | |
.rectangulo { | |
@include borde; | |
width: $size; | |
height: calc(100vh - #{$size}); | |
//height: calc(#{$size} * 4); //$size*2; | |
.link { | |
/* <div class="rectangulo"><a class="link"> */ | |
color: $color2; | |
} | |
&.borde-rojo { | |
/* <div class="rectangulo borde-rojo"> */ | |
border-color: #f00; | |
} | |
} | |
.cuadrado { | |
@include borde; | |
width: $size; | |
height: $size; | |
} | |
//@import 'estilo.css'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment