WordPress Meetup Tilburg, 12 Maart 2014
Gaya Kessler
Blog: http://www.gayadesign.com
Slides: http://talk.gayadesign.com
Twitter: @gayadesign
HTML, CSS, images, JavaScript, overige assets, optimalisatie assets, optimalisatie voor de browser, unit tests uitvoeren
Dus gaan we weer..
optimalisatie assets, optimalisatie voor de browser, unit testing
CSS is niet te beheersen.
JavaScript is een ophoping van ellende.
Optimalisatie kost te veel tijd.
$ gem install sass
$header-color: #666;
$body-color: #333;
body {
color: $body-color;
}
h1, h2, h3, h4 {
color: $header-color;
}
body {
color: #333;
}
h1, h2, h3, h4 {
color: #666;
}
.header {
ul {
margin: 0px;
li {
padding: 0px;
font: {
family: 'Open Sans', sans-serif;
size: 21pt;
}
&:hover {
background: #666;
}
}
}
}
.header ul {
margin: 0px;
}
.header ul li {
padding: 0px;
font-family: 'Open Sans', sans-serif;
font-size: 21pt;
}
.header ul li:hover {
background: #666;
}
/* _settings.scss, _layout.scss */
@import "settings";
@import "layout";
body {
background-color: $body-color;
color: $body-text;
}
@mixin fix-for-ie6($display) {
display: $display;
}
header {
@include fix-for-ie6(none);
}
header {
display: none;
}
.button {
border-radius: 2px;
background: #eee;
color: #420;
}
.submit {
@extend .button;
}
.next {
@extend .button;
}
.button, .submit, .next {
border-radius: 2px;
background: #eee;
color: #420;
}
$ gem install compass
relative_assets = true
css_dir = "css"
sass_dir = "sass"
images_dir = "images"
output_style = :expanded # After dev :compressed
line_comments = true
preferred_syntax = :scss
$ npm install -g grunt-cli
{
"name": "project-name",
"version": "1.3.37",
"description": "Een voorbeeld van een project",
"main": "",
"scripts": {
"test": "grunt test"
},
"author": "Gaya Kessler",
"license": "MIT",
"devDependencies": {
"grunt": "~0.4.2"
}
}
$ npm install grunt --save-dev
Blog: http://www.gayadesign.com
Slides: http://talk.gayadesign.com
Twitter: @gayadesign