-
Notifications
You must be signed in to change notification settings - Fork 0
/
03-sass-compass.html
278 lines (238 loc) · 9.7 KB
/
03-sass-compass.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>CSS3 Basics » Alexander Bogomolov</title>
<meta name="description" content="impress.js is a presentation tool based on the power of CSS3 transforms and transitions in modern browsers and inspired by the idea behind prezi.com.">
<meta name="author" content="Alexander Bogomolov" />
<link href="http://fonts.googleapis.com/css?family=Open+Sans:regular,semibold,italic,italicsemibold|PT+Sans:400,700,400italic,700italic|PT+Serif:400,700,400italic,700italic" rel="stylesheet" />
<link href="lib/css/impress-js.css" rel="stylesheet" />
<link href="lib/css/style.css" rel="stylesheet" />
<link href="lib/plugins/highlight/styles/default.css" rel="stylesheet" />
</head>
<body>
<section id="presentation">
<header>
<progress id="presentation-progress" max="10" value="1"></progress>
</header>
<div id="impress" class="impress-not-supported">
<article id="intro" class="step" data-x="0" data-y="0" data-scale="1">
<h1>SASS & Compass</h1>
<p>CSS Preprocessor mit vielen tollen Features</p>
</article>
<!--
<article id="einfacher" class="step" data-x="1500" data-y="0" data-z="0" data-scale="1" data-rotate="-90" data-rotate-x="0" data-rotate-y="0">
<h1>Einleitung</h1>
</article>
-->
<article id="sass-vs-scss" class="step" data-x="0" data-y="1300" data-z="0" data-scale="1" data-rotate="0" data-rotate-x="0" data-rotate-y="0">
<h1>SASS vs. SCSS</h1>
<h2>SASS</h2>
<pre><code class="language-css">.class
margin: 10px
.subclass
color: red</code></pre>
<h2>SCSS</h2>
<pre><code class="language-css">.class {
margin: 10px;
.subclass {
color: red;
}
}</code></pre>
</article>
<article id="variablen" class="step" data-x="0" data-y="-1300" data-z="0" data-scale="1" data-rotate="90" data-rotate-x="0" data-rotate-y="0">
<h1>Variablen</h1>
<h2>SCSS</h2>
<pre><code class="language-css">$logo-blue: #0090D1;
$logo-gray: #767372;
a { color: $logo-blue; }
a:hover { color: $logo-gray; }
</code></pre>
<h2>CSS</h2>
<pre><code class="language-css">a { color: #0090D1; }
a:hover { color: #767372; }</code></pre>
</article>
<article id="rechnen" class="step" data-x="-1500" data-y="0" data-z="0" data-scale="1" data-rotate="0" data-rotate-x="0" data-rotate-y="0">
<h1>Rechnen</h1>
<pre><code class="language-css">div { width: 40px + 2px - 5px / 2 * 10; }</code></pre>
<pre><code class="language-css">$width-page: 960px;
$width-sidebar: 200px;
$width-content: $width-page - $width-sidebar;
#page { width: $width-page; }
#sidebar { width: $width-sidebar; }
#content { width: $width-content; }</code></pre>
<h2>Berechnugnen</h2>
<pre><code class="language-css">round(3.3); /* 3 */
ceil(3.3); /* 4 */
floor(3.9); /* 3 */
abs(-12); /* 12 */
precentage(26/50); /* 52 */</code></pre>
</article>
<article id="nesting-1" class="step" data-x="-1500" data-y="800" data-z="0" data-scale="1" data-rotate="180" data-rotate-x="0" data-rotate-y="0">
<h1>Nesting</h1>
<h2>SCSS</h2>
<pre><code class="language-css">.class {
color: green;
.subclass {
color: red;
}
}</code></pre>
<h2>CSS</h2>
<pre><code class="language-css">.class { color: green; }
.class .subclass { color: red; }</code></pre>
</article>
<article id="selektoren-2" class="step" data-x="3000" data-y="0" data-z="0" data-scale="1" data-rotate="5" data-rotate-x="10" data-rotate-y="5">
<h1>Nesting</h1>
<h2>SCSS</h2>
<pre><code class="language-css">a {
color: green;
&:hover {
color: red;
}
}
button {
background: #ccc;
.no-bg & {
background: transparent;
}
}</code></pre>
<h2>CSS</h2>
<pre><code class="language-css">a { color: green; }
a:hover { color: red; }
button { background: #ccc; }
.no-bg button { background: transparent; }</code></pre>
</article>
<article id="auslagern" class="step" data-x="3000" data-y="800" data-z="0" data-scale="1" data-rotate="-5" data-rotate-x="5" data-rotate-y="10">
<h1>Auslagern</h1>
<h2>SCSS</h2>
<pre><code class="language-css">.message {
border: 1px solid transparent;
padding: 1em;
margin: 1em 0;
}
.error {
@extend .message;
border-color: red;
}</code></pre>
<h2>CSS</h2>
<pre><code class="language-css">.message, .error {
border: 1px solid transparent;
padding: 1em;
margin: 1em 0;
}
.error {
border-color: red;
}</code></pre>
</article>
<article id="mixins" class="step" data-x="3000" data-y="1800" data-z="0" data-scale="1" data-rotate="5" data-rotate-x="0" data-rotate-y="0">
<h1>Mixins</h1>
<h2>SCSS</h2>
<pre><code class="language-css">@mixin border-radius($radius:5px) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
border-radius: $radius;
}
div {
@include border-radius(10px);
}</code></pre>
<h2>CSS</h2>
<pre><code class="language-css">div {
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
}</code></pre>
</article>
<article id="if" class="step" data-x="3000" data-y="2800" data-z="0" data-scale="1" data-rotate="180" data-rotate-x="0" data-rotate-y="0">
<h1>Abfragen</h1>
<h2>SCSS</h2>
<pre><code class="language-css">@mixin color($dark:false) {
@if $dark == treu {
color: #000;
&:hover { color: blue; }
} @else {
color: #fff;
&:hover { color: #ccc; };
}
}
a.odd { @include color(); }
a.even { @include color(true); }</code></pre>
<h2>CSS</h2>
<pre><code class="language-css">a.odd { color: #000 }
a.odd:hover { color: blue; }
a.even { color: #fff; }
a.even:hover { color: #ccc; }</code></pre>
</article>
<article id="compass" class="step" data-x="5000" data-y="0" data-z="0" data-scale="1" data-rotate="-10" data-rotate-x="0" data-rotate-y="0">
<h1>Compass</h1>
<img class="left" src="images/css_sass_compass.jpg" alt="CSS vs. SASS vs. Compass" />
<ul class="clear">
<li>SASS</li>
<li>Mehr Funktionen</li>
<li>Mixins Bibliothek</li>
<li>Erweiterungen</li>
</ul>
<aside>
<ol>
<li><a href="http://maddesigns.de/compass-sass-1472.html" title="">Bildquelle</a></li>
</ol>
</aside>
</article>
<article id="bilder" class="step" data-x="5000" data-y="800" data-z="0" data-scale="1" data-rotate="5" data-rotate-x="0" data-rotate-y="0">
<h1>Arbeiten mit Bildern</h1>
<h2>SCSS</h2>
<pre><code class="language-css">header {
background: image-url('mein-bild.png');
h1 {
width: image-width('mein-bild.png');
height: image-height('mein-bild.png');
}
}</code></pre>
<h2>CSS</h2>
<pre><code class="language-css">header { background: url('images/mein-bild.png?123456789'); }
header h1 {
width: 560px;
height: 240px;
}</code></pre>
</article>
<article id="sprites" class="step" data-x="5000" data-y="1600" data-z="0" data-scale="1" data-rotate="180" data-rotate-x="0" data-rotate-y="0">
<h1>Sprites</h1>
<h2>SCSS</h2>
<pre><code class="language-css">@import "icon/*.png";
@import all-icon-sprites($dimensions:true);</code></pre>
<h2>CSS</h2>
<pre><code class="language-css">.icon-sprite, .icon-minus { background: url('images/icon-sd6115b5d.png') no-repeat; }
.icon-minus {
background-position: 15px 255px;
width: 16px;
height: 16px;
}</code></pre>
</article>
<article id="links" class="step" data-x="-3000" data-y="0" data-z="0" data-scale="1" data-rotate="90" data-rotate-x="0" data-rotate-y="0">
<h1>Links</h1>
<ul>
<li><a href="http://sass-lang.com/">Sass - Syntactically Awesome Stylesheets</a></li>
<li><a href="http://compass-style.org/">Compass</a></li>
<li><a href="http://www.webkrauts.de/2011/12/04/sass-compas/">Effiziente CSS-Entwicklung mit Sass und Compass (Teil 1)</a></li>
<li><a href="http://www.webkrauts.de/2011/12/05/sass-compass2/">Effiziente CSS-Entwicklung mit Sass und Compass (Teil 2)</a></li>
<li><a href="http://maddesigns.de/compass-sass-1472.html">Compass & SASS – CSS3 Adventskalender Tag 17</a></li>
<li><a href="http://www.youtube.com/playlist?list=PL2CB1F80266E986EA">Sass Tutorials</a></li>
</ul>
</article>
<article id="danke" class="step" data-x="0" data-y="-2500" data-z="0" data-scale="1" data-rotate="180" data-rotate-x="0" data-rotate-y="0">
<h1>Vielen Dank!</h1>
<img id="me" src="lib/images/me.jpg" alt="Alexander Bogomolov" />
<ul class="clear">
<li><a href="http://www.twitter.de/abogomolov" title="Alexander auf Twitter">@abogomolov</a></li>
<li><a href="http://www.bogomolov.de/+" title="Alexander auf Google Plus">+Alexander Bogomolov</a></li>
</ul>
</article>
<article id="overview" class="step" data-x="500" data-y="500" data-scale="10"></article>
</div>
<footer>Alexander Bogomolov - <span class="eos-color">EOS</span> UPTRADE GmbH</footer>
</section>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script src="lib/js/impress.js"></script>
<script src="lib/plugins/highlight/highlight.pack.js"></script>
<script src="lib/js/scripts.js"></script>
</body>
</html>