Created
October 26, 2022 18:23
-
-
Save pochitax/cdeb1038ce73cad5dddde0719f5aea42 to your computer and use it in GitHub Desktop.
Ejemplo Sass
This file contains hidden or 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 | |
$color: rgba(0,0,0,.5); | |
// Mixins | |
@mixin large-text { | |
font-family: Arial; | |
font-weight: bold; | |
font-size: 20px; | |
color: #ff0000; | |
} | |
@mixin texto-negro { | |
@include large-text; | |
color: $color; | |
} | |
@mixin cajita { | |
border-radius: 5px; | |
border: 1px solid $color; | |
box-shadow: 2px 2px 10px rgba(0,0,0,.5); | |
padding: 20px; | |
} | |
// estilos generales | |
body { | |
background-color: $color; | |
@include texto-negro; | |
} | |
div { | |
color: $color; | |
span { | |
border-color: $color; | |
} | |
&.azul { | |
color: blue; | |
} | |
&:hover { | |
text-decoration: underline; | |
} | |
} | |
.page-title { | |
@include large-text; | |
padding: 4px; | |
margin-top: 10px; | |
} | |
h2 { | |
@include large-text; | |
} | |
.modulo-1 { | |
@include cajita; | |
background-color: yellow; | |
} | |
.modulo-2 { | |
@include cajita; | |
background-color: green; | |
height: 100px; | |
width: 100%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment