This work is produced by Johan Leitet for the course Client-based Web Programming (1DV022) at Linnaeus University.
All content in this work excluding photographs, icons, picture of course litterature and Linnaeus University logotype and symbol, is licensied under a
Creative Commons Attribution 4.0 International License.
If you change the content do not use the photographs, icons, picture of the course literature or Linnaeus University logotype and symbol in your new work!
At all times you must give credit to: ”Linnaeus university – Client-based Web Programming (1DV022)” with the link https://coursepress.lnu.se/kurs/klientbaserad-webbprogrammering/ and to the Creative Common-license above.
scss:
$font-stack: Helvetica, sans-serif;
$primary-color: #333;
body {
font: 100% $font-stack;
color: $primary-color;
}
css:
body {
font: 100% Helvetica, sans-serif;
color: #333;
}
scss:
nav {
ul { margin: 0; padding: 0; list-style: none; }
li { display: inline-block; }
a { display: block;
padding: 6px 12px;
text-decoration: none;
}
}
css:
nav ul { margin: 0; padding: 0; list-style: none; }
nav li { display: inline-block; }
nav a { display: block;
padding: 6px 12px; text-decoration: none; }
scss:
@mixin border-radius($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-ms-border-radius: $radius;
border-radius: $radius;
}
.box { @include border-radius(10px); }
css:
.box {
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
-ms-border-radius: 10px;
border-radius: 10px;
}
scss:
@import "css-file.css";
@import "_reset";
@import "mobile";
css:
@import url(css-file.css);
body { margin: 0; }
div { width: 100%; }
scss:
$width: 960px;
.container { width: 100%; }
aside[role="complimentary"] {
float: right;
width: 300px / $width * 100%;
}
css:
.container { width: 100%; }
aside[role="complimentary"] {
float: right;
width: 31.25%;
}
Källa:
http://adamsilver.io/articles/the-disadvantages-of-css-preprocessors/
main.css.map
{
"version": 3,
"mappings": "AAAA,IAAK;EAAE,MAAM,EAAE,CAAC;;ACAhB,GAAI;EACH,KAAK,EAAE,IAAI",
"sources": ["_reset.scss","mobile.scss"],
"names": [],
"file": "main.css"
}
... css code here ...
/*# sourceMappingURL=main.css.map */
Takes templates, text, html as input and produces a static html site
default.html
<!DOCTYPE html>
<html>
{% include head.html %}
<body>
{% include header.html %}
<div class="page-content">
....
</div>
{% include footer.html %}
</body>
</html>
blogpage.html:
<ul>
{% for post in site.posts %}
<li>
<a href="{{ post.url }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>
.md:
##Header 2
This is a normal paragraph.
###Header 3
1. This
2. list is
* nested
3. and ordered
html
<h2>Header 2</h2>
<p>This is a normal paragraph.</p>
<h3>Header 3</h3>
<ol>
<li>This</li>
<li>list is
<ul><li>nested</li></ul>
</li>
<li>and ordered</li>
</ol>
~ $ jekyll new myblog
cd myblog
~/myblog $ jekyll serve