Más contenido relacionado Similar a Palestra pré processadores CSS (20) Palestra pré processadores CSS5. Compilando Less
no tempo de execução
<link rel=”stylesheet/less” type=”text/css” href=”style.less” />
<script type=”text/javascript” src=”js/less-1.1.3.min.js”></script>
6. Compilando Less
para um arquivo .css
$ sudo apt-get install npm
$ sudo apt-get install node-less
$ npm install -g less
$ lessc style.less > style.css
9. @import "mixin.less";
.body{
background: hardlight(#ff6600, #cccccc);
margin: 0 auto;
padding: 20px;
width: 960px;
height: 400px;
.radius(100px 60px 10px 75px);
}
h1{
.texto;
color: negation(#ff6600, #cccccc);
margin-bottom: 50px;
font-size: 40px;
}
p{
.texto;
color: difference(#ff6600, #0000ff);
font-size: 20px;
}
19. @import url("http://fonts.googleapis.com/css?family=Averia+Sans+Libre")
@import "compass/css3"
$black : #000
$white : #fff
$paragrafo : #a2c999 - 40
@mixin condicao($teste: true)
@if $teste == false
font-family: 'Averia Sans Libre'
font-size: 40px
color: $white
text-align: center
margin: 0 0 35px 0
@else if $teste == 1
font-size: 30px
color: $paragrafo
text-align: center
font-weight: normal
font-family: arial
margin: 0 0 35px 0
@else
font-size: 70px
color: #0000ff + $paragrafo
font-family: "Courier New"
margin: 0
21. @import url("http://fonts.googleapis.com/css?family=Averia+Sans+Libre");
.content {
background: black;
-webkit-border-radius: 25px 60px 0 40px;
-moz-border-radius: 25px 60px 0 40px;
-ms-border-radius: 25px 60px 0 40px;
-o-border-radius: 25px 60px 0 40px;
border-radius: 25px 60px 0 40px;
width: 960px;
height: 300px;
margin: 0 auto;
}
.content h1 {
font-family: "Averia Sans Libre";
font-size: 40px;
color: white;
text-align: center;
margin: 0 0 35px 0;
}
.content p {
font-size: 30px;
color: #7aa171;
text-align: center;
font-weight: normal;
font-family: arial;
margin: 0 0 35px 0;
}
.content .paragrafo {
font-size: 70px;
color: #7aa1ff;
font-family: "Courier New";
margin: 0;
}
24. @import url("http://fonts.googleapis.com/css?family=Averia+Sans+Libre");
.teste_for_1 {
width: 100%;
height: 40px;
background: #0000af;
margin-bottom: 40px;
-webkit-border-radius: 40px;
-moz-border-radius: 40px;
-ms-border-radius: 40px;
-o-border-radius: 40px;
border-radius: 40px;
}
.teste_for_2 {
width: 100%;
height: 40px;
background: #0000af;
margin-bottom: 40px;
-webkit-border-radius: 40px;
-moz-border-radius: 40px;
-ms-border-radius: 40px;
-o-border-radius: 40px;
border-radius: 40px;
}
.content {
background: white;
-webkit-box-shadow: green 6px 6px 40px;
-moz-box-shadow: green 6px 6px 40px;
box-shadow: green 6px 6px 40px;
width: 960px;
height: 400px;
margin: 0 auto;
padding-top: 30px;
}
25. @import url("http://fonts.googleapis.com/css?family=Averia+Sans+Libre");
.teste_for_1 {
width: 100%;
height: 40px;
background: #0000af;
margin-bottom: 40px;
-webkit-border-radius: 40px;
-moz-border-radius: 40px;
-ms-border-radius: 40px;
-o-border-radius: 40px;
border-radius: 40px;
}
.teste_for_2 {
width: 100%;
height: 40px;
background: #0000af;
margin-bottom: 40px;
-webkit-border-radius: 40px;
-moz-border-radius: 40px;
-ms-border-radius: 40px;
-o-border-radius: 40px;
border-radius: 40px;
}
.content {
background: white;
-webkit-box-shadow: green 6px 6px 40px;
-moz-box-shadow: green 6px 6px 40px;
box-shadow: green 6px 6px 40px;
width: 960px;
height: 400px;
margin: 0 auto;
padding-top: 30px;
}