Más contenido relacionado La actualidad más candente (13) Similar a Intro a Sass (20) Intro a Sass 5. #header #navigation {
float: left;
}
#page .menu {
float: left;
}
#main .menu {
float: right!important;
}
7. h1, h2, h3, h4, h5 {
font-family: Arial,sans-serif;
font-size: 12px;
font-weight: normal;
line-height: 1.2em;
font-size: 110%;
}
17. Como no es CSS, no estamos atados a
las limitantes de CSS.
18. Como no es CSS, no estamos atados a
las limitantes de CSS.
Nesting, Variables, Mixins y Functions.
29. Dos formatos:
• Sassy CSS / .scss
.content-navigation {
border-color: $blue;
color: darken($blue, 9%);
}
• Indented syntax / .sass
.content-navigation
border-color: $blue
color: darken($blue, 9%)
41. Nesting
a {
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
42. Nesting
.aftercontent {
overflow: hidden;
width: flex-grid(6);
padding-top: $double-spacing-unit;
@media screen and (min-width: $break-five) {
padding-top: $double-spacing-unit * 2;
}
}
.aftercontent {
overflow: hidden;
width: 100%;
padding-top: 40px;
}
@media screen and (min-width: 940px) {
.aftercontent { padding-top: 80px; }
}
44. Mixins
Nos permite reutilizar porciones de código,
se pueden “pasar” argumentos.
@mixin vendor($property, $value...){
-webkit-#{$property}:$value;
-moz-#{$property}:$value;
-ms-#{$property}:$value;
-o-#{$property}:$value;
#{$property}:$value;
}
45. Mixins
@mixin font-size($font-size, $line-height:true {
font-size:$font-size;
font-size:($font-size / $base-font-size)*1em;
@if $line-height == true{
line-height:ceil($font-size / $base-line-height) *
($base-line-height / $font-size);
}
}
h2 {
@include font-size($h2-size);
@media screen and (min-width: $break-four) {
@include font-size(24px);
}
}
50. Hay que tener en cuenta:
• Usar el mismo preprocesador.
• Trabajar local.
51. Hay que tener en cuenta:
• Usar el mismo preprocesador.
• Trabajar local.
• Planificar.
52. Hay que tener en cuenta:
• Usar el mismo preprocesador.
• Trabajar local.
• Planificar.
• Cuidar el output, pero no tanto.