"screen.scss" "print.scss" . , HTML, : , , . , , : "mobile.scss", HTML @media.
mixins HTML.
HTML. , SCSS: CSS HTML . mixins Sass.
SASS Blueprint
, Blueprint , Compass, , , Blueprint:
1. Blueprint HTML
, , /:
screen.scss
@import "blueprint";
// This outputs Blueprint classes into your stylesheet:
@include blueprint;
#sidebar { background: $blue; }
#main { background: $yellow; }
screen.css()
.column { float: ... }
.span-6 { width: ... }
.span-12 {width: ... }
/* ...etc., all of Blueprint classes ... */
#sidebar { background: #ccf; }
#main { background: #ffc; }
index.html
<div id="sidebar" class="column span-6">sidebar content</div>
<div id="main" class="column span-12">main content</div>
, Blueprint Sass/Compass. HTML , style="width:120px" : .
2. Blueprint mixins :
screen.scss
@import "blueprint";
// Do not output Blueprint classes into your stylesheet.
// Instead, write your own classes and mixin the functionality:
#sidebar {
@extend .column;
@include span(6);
background: $blue; }
#main {
@extend .column;
@include span(12);
background: $yellow; }
screen.css()
.column, #sidebar, #main { float: left; ... }
#sidebar { width: 240px; background: #ccf; }
#main { width: 480px; background: #ffc; }
index.html
<div id="sidebar">sidebar content</div>
<div id="main">main content</div>
, Blueprint HTML .
@extend ( @include) - , , . , "", ; .