Compare commits

...

16 Commits
1.2 ... master

Author SHA1 Message Date
Kazhnuz 60bc795bf1 meta: prepare for true 2.0.0 release 2019-11-07 13:00:53 +01:00
Kazhnuz 56a2c02b11 improvement: new default height 2019-11-07 12:55:36 +01:00
Kazhnuz 18c8a9878a chore : slight refactoring for ul and ol 2019-11-07 12:52:49 +01:00
Kazhnuz 13c252ee9e fix: well overflowing 2019-11-07 12:51:31 +01:00
Kazhnuz e1a43513ce fix: make sup/sub no longer affect lineheight 2019-11-07 12:49:17 +01:00
Kazhnuz 8f4d4fc4c0 improvement: rework well styling 2019-11-07 12:37:56 +01:00
Kazhnuz 2f0ea5b8bd resture debug grid drawing 2019-11-07 12:28:41 +01:00
Kazhnuz dd51e1e170 improvement: add a $lineheight variable 2019-11-07 12:22:09 +01:00
Kazhnuz 066566d170 meta : switch to keep a changelog for the changelog 2019-11-07 12:08:39 +01:00
Kazhnuz 94cb3385b8 meta: prepare for 2.0 2019-11-04 16:03:59 +01:00
Kazhnuz c16d9d2e28 improvement: rework text-wrapper 2019-11-04 16:02:16 +01:00
Kazhnuz 4437f9b180 fix: use right margins for hr 2019-11-04 15:58:16 +01:00
Kazhnuz e7ed01381d fix: rework entirely titles 2019-11-04 15:57:00 +01:00
Kazhnuz 0e1fee29bd fix: use margin instead of padding for paragraphs delimitations 2019-11-04 15:47:24 +01:00
Kazhnuz f716db73c7 fix: make sure that baseline is done according to text height 2019-11-04 15:28:23 +01:00
Kazhnuz 5234abfdd3 fix: use rem instead of em for line-height 2019-11-04 15:21:06 +01:00
7 changed files with 317 additions and 401 deletions

76
CHANGELOG.md Normal file
View File

@ -0,0 +1,76 @@
# CHANGELOG
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [2.0.0] - 2019-11-07
### Added
- Modifiable variables for sizing
- Restore debug grid drawing
### Changed
- Switch to using rem instead of em for sizing
- Support vertical rythm
- Auto-calculate lineheight for titles
- Default lineheight is now 1.75
### Fixed
- Line-height is no longer affected by sup and sub
- Better overflowing for wells
## [1.2.0] - 2018-15-03
### Changed
- Switch to Open Sans, in order to solve problem with LightItalic font
## [1.1.0] - 2018-12-03
### Added
- Debug class added to show line heights
### Changed
- Stylesheet ported to SCSS
- Better typography : by making sure that lines always follow line heights
## [1.0.0] - 2018-10-03
### Added
- More markup support : pre, mark and blockquote
- Wrapper system to handle font size changes with responsive design
- Night Mode support
### Changed
- Better typographic support :
- Don't justify text
- Better contrast with text
- Remove underlining and centering in title
- Tweaks in titles size
- Nicer styling for hr
## [0.1.0] - 2014-12-08
- Just a basic bad typographic css stylesheet.

37
NEWS
View File

@ -1,37 +0,0 @@
# NEWS
## Clear Typography 1.2
- Switch to Open Sans, in order to solve problem with LightItalic font
## Clear Tyopgraphy 1.1
Changes since 1.0 :
- Stylesheet ported to SCSS
- Debug class added to show line heights
- Better typography : by making sure that lines always follow line heights
## Clear Typography 1.0
Changes since 0.1 :
- Better typographic support :
- Don't justify text
- Better contrast with text
- Remove underlining and centering in title
- Tweaks in titles size
- Nicer styling for hr
- More markup support : pre, mark and blockquote
- Wrapper system to handle font size changes with responsive design
- Night Mode support

View File

@ -1,207 +1,215 @@
/* ------------------ FONT LOADING ------------------- */
@font-face {
font-family: 'OpenSans';
font-family: "OpenSans";
src: url("../fonts/OpenSans-Light-webfont.eot");
src: url("../fonts/OpenSans-Light-webfont.eot?#iefix") format("embedded-opentype"), url("../fonts/OpenSans-Light-webfont.woff2") format("woff2"), url("../fonts/OpenSans-Light-webfont.woff") format("woff"), url("../fonts/OpenSans-Light-webfont.ttf") format("truetype"), url("../fonts/OpenSans-Light-webfont.svg#open_sansbold") format("svg");
font-weight: 300;
font-style: normal; }
font-style: normal;
}
@font-face {
font-family: 'OpenSans';
font-family: "OpenSans";
src: url("../fonts/OpenSans-LightItalic-webfont.eot");
src: url("../fonts/OpenSans-LightItalic-webfont.eot?#iefix") format("embedded-opentype"), url("../fonts/OpenSans-LightItalic-webfont.woff2") format("woff2"), url("../fonts/OpenSans-LightItalic-webfont.woff") format("woff"), url("../fonts/OpenSans-LightItalic-webfont.ttf") format("truetype"), url("../fonts/OpenSans-LightItalic-webfont.svg#open_sansbold") format("svg");
font-weight: 300;
font-style: italic; }
font-style: italic;
}
@font-face {
font-family: 'OpenSans';
font-family: "OpenSans";
src: url("../fonts/OpenSans-Regular-webfont.eot");
src: url("../fonts/OpenSans-Regular-webfont.eot?#iefix") format("embedded-opentype"), url("../fonts/OpenSans-Regular-webfont.woff2") format("woff2"), url("../fonts/OpenSans-Regular-webfont.woff") format("woff"), url("../fonts/OpenSans-Regular-webfont.ttf") format("truetype"), url("../fonts/OpenSans-Regular-webfont.svg#open_sansbold") format("svg");
font-weight: 400;
font-style: normal; }
font-style: normal;
}
@font-face {
font-family: 'OpenSans';
font-family: "OpenSans";
src: url("../fonts/OpenSans-Italic-webfont.eot");
src: url("../fonts/OpenSans-Italic-webfont.eot?#iefix") format("embedded-opentype"), url("../fonts/OpenSans-Italic-webfont.woff2") format("woff2"), url("../fonts/OpenSans-Italic-webfont.woff") format("woff"), url("../fonts/OpenSans-Italic-webfont.ttf") format("truetype"), url("../fonts/OpenSans-Italic-webfont.svg#open_sansbold") format("svg");
font-weight: 400;
font-style: italic; }
font-style: italic;
}
@font-face {
font-family: 'OpenSans';
font-family: "OpenSans";
src: url("../fonts/OpenSans-Semibold-webfont.eot");
src: url("../fonts/OpenSans-Semibold-webfont.eot?#iefix") format("embedded-opentype"), url("../fonts/OpenSans-Semibold-webfont.woff2") format("woff2"), url("../fonts/OpenSans-Semibold-webfont.woff") format("woff"), url("../fonts/OpenSans-Semibold-webfont.ttf") format("truetype"), url("../fonts/OpenSans-Semibold-webfont.svg#open_sansbold") format("svg");
font-weight: 600;
font-style: normal; }
font-style: normal;
}
@font-face {
font-family: 'OpenSans';
font-family: "OpenSans";
src: url("../fonts/OpenSans-SemiboldItalic-webfont.eot");
src: url("../fonts/OpenSans-SemiboldItalic-webfont.eot?#iefix") format("embedded-opentype"), url("../fonts/OpenSans-SemiboldItalic-webfont.woff2") format("woff2"), url("../fonts/OpenSans-SemiboldItalic-webfont.woff") format("woff"), url("../fonts/OpenSans-SemiboldItalic-webfont.ttf") format("truetype"), url("../fonts/OpenSans-SemiboldItalic-webfont.svg#open_sansbold") format("svg");
font-weight: 600;
font-style: italic; }
font-style: italic;
}
@font-face {
font-family: 'OpenSans';
font-family: "OpenSans";
src: url("../fonts/OpenSans-Bold-webfont.eot");
src: url("../fonts/OpenSans-Bold-webfont.eot?#iefix") format("embedded-opentype"), url("../fonts/OpenSans-Bold-webfont.woff2") format("woff2"), url("../fonts/OpenSans-Bold-webfont.woff") format("woff"), url("../fonts/OpenSans-Bold-webfont.ttf") format("truetype"), url("../fonts/OpenSans-Bold-webfont.svg#open_sansbold") format("svg");
font-weight: 700;
font-style: normal; }
font-style: normal;
}
@font-face {
font-family: 'OpenSans';
font-family: "OpenSans";
src: url("../fonts/OpenSans-BoldItalic-webfont.eot");
src: url("../fonts/OpenSans-BoldItalic-webfont.eot?#iefix") format("embedded-opentype"), url("../fonts/OpenSans-BoldItalic-webfont.woff2") format("woff2"), url("../fonts/OpenSans-BoldItalic-webfont.woff") format("woff"), url("../fonts/OpenSans-BoldItalic-webfont.ttf") format("truetype"), url("../fonts/OpenSans-BoldItalic-webfont.svg#open_sansbold") format("svg");
font-weight: 700;
font-style: italic; }
font-style: italic;
}
@font-face {
font-family: 'OpenSans';
font-family: "OpenSans";
src: url("../fonts/OpenSans-ExtraBold-webfont.eot");
src: url("../fonts/OpenSans-ExtraBold-webfont.eot?#iefix") format("embedded-opentype"), url("../fonts/OpenSans-ExtraBold-webfont.woff2") format("woff2"), url("../fonts/OpenSans-ExtraBold-webfont.woff") format("woff"), url("../fonts/OpenSans-ExtraBold-webfont.ttf") format("truetype"), url("../fonts/OpenSans-ExtraBold-webfont.svg#open_sansbold") format("svg");
font-weight: 800;
font-style: normal; }
font-style: normal;
}
@font-face {
font-family: 'OpenSans';
font-family: "OpenSans";
src: url("../fonts/OpenSans-ExtraBoldItalic-webfont.eot");
src: url("../fonts/OpenSans-ExtraBoldItalic-webfont.eot?#iefix") format("embedded-opentype"), url("../fonts/OpenSans-ExtraBoldItalic-webfont.woff2") format("woff2"), url("../fonts/OpenSans-ExtraBoldItalic-webfont.woff") format("woff"), url("../fonts/OpenSans-ExtraBoldItalic-webfont.ttf") format("truetype"), url("../fonts/OpenSans-ExtraBoldItalic-webfont.svg#open_sansbold") format("svg");
font-weight: 800;
font-style: italic; }
/* ------------------ GLOBAL STYLE ------------------- */
body {
font-style: italic;
}
html {
font-family: OpenSans, sans-serif;
text-align: left;
font-size: 4mm;
line-height: 1.5em;
font-size: 18px;
}
body {
line-height: 1.75rem;
color: #444;
font-weight: 400; }
font-weight: 400;
}
.debug {
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0, rgba(255, 255, 255, 0) 1px);
background-repeat: repeat-y;
background-size: 100% 1.75rem;
}
.night-mode {
color: #BBB; }
color: #BBB;
}
strong {
font-weight: 600; }
font-weight: 600;
}
em {
font-style: italic; }
font-style: italic;
}
a {
color: #2484c1;
text-decoration: none; }
text-decoration: none;
}
p {
p, time {
padding: 0;
padding-bottom: 1.5em;
margin: 0; }
p:last-child {
padding-bottom: 0; }
margin: 0;
margin-bottom: 1.75rem;
}
p:last-child, time:last-child {
margin-bottom: 0;
}
ul {
ul, ol {
padding: 0;
padding-bottom: 1.5em;
margin: 0; }
ul ul {
padding-bottom: 0; }
ul li {
margin-left: 1.5em; }
margin: 0;
margin-bottom: 1.75rem;
}
ul ul, ol ul {
margin-bottom: 0;
}
ul li, ol li {
margin-left: 1.75rem;
}
ol {
/* sup, sub */
sup, sub {
margin: 0;
padding: 0;
padding-bottom: 1.5em;
margin: 0; }
ol ol {
padding-bottom: 0; }
ol li {
margin-left: 1.5em; }
line-height: 1.75rem;
font-size: 0.8rem;
vertical-align: baseline;
position: relative;
}
sup {
top: -0.4375rem;
}
sub {
top: 0.4375rem;
}
::selection {
background: #2484c1;
color: #fff; }
color: #fff;
}
::-moz-selection {
background: #2484c1;
color: #fff; }
color: #fff;
}
/* ------------------ WRAPPERS ------------------- */
.text-wrapper {
font-size: calc(2.5mm + 1vw);
width: 720px;
margin: auto;
line-height: 1.5em; }
.text-wrapper.debug {
background-image: -webkit-linear-gradient(transparent 95%, rgba(159, 96, 96, 0.5) 95%);
background-image: -moz-linear-gradient(transparent 95%, rgba(159, 96, 96, 0.5) 95%);
background-image: -ms-linear-gradient(transparent 95%, rgba(159, 96, 96, 0.5) 95%);
background-image: -o-linear-gradient(transparent 95%, rgba(159, 96, 96, 0.5) 95%);
background-image: linear-gradient(transparent 95%, rgba(159, 96, 96, 0.5) 95%);
background-position: 50% 0;
background-size: 1.5em 1.5em; }
@media screen and (min-width: 640px) {
.text-wrapper.size-640 {
max-width: 640px;
font-size: calc(2.5mm + 6.4px); } }
@media screen and (min-width: 800px) {
.text-wrapper.size-800 {
font-size: calc(2.5mm + 8.0px);
max-width: 800px; } }
@media screen and (min-width: 920px) {
.text-wrapper.size-920 {
font-size: calc(2.5mm + 9.2px);
max-width: 800px; } }
@media screen and (min-width: 1200px) {
.text-wrapper.size-1200 {
font-size: calc(2.5mm + 12px);
max-width: 800px; } }
}
/* ------------------ TITLES ------------------- */
h1, h2, h3, h4, h5, h6, h7 {
text-align: left;
font-size: 1em;
line-height: 1.5em;
font-size: 18px;
line-height: 1.75rem;
padding: 0;
margin: 0;
font-weight: 400; }
font-weight: 400;
}
h1 {
font-size: 2.33333em;
line-height: 1em;
padding: 0.33333em 0 0.6em 0;
font-weight: 700; }
font-size: 2.3333333rem;
line-height: 3.5rem;
margin-bottom: 1.75rem;
font-weight: 700;
}
h2 {
font-size: 2em;
line-height: 1.5em;
padding: 0.33333em 0 0.4em 0;
font-weight: 700; }
font-size: 2rem;
line-height: 3.5rem;
margin-bottom: 1.75rem;
font-weight: 700;
}
h3 {
font-size: 1.5em;
line-height: 1em;
padding: 0em 0 1em 0;
font-weight: 700; }
font-size: 1.5rem;
line-height: 1.75rem;
margin-bottom: 1.75rem;
font-weight: 700;
}
h4 {
font-size: 1.5em;
line-height: 1em;
padding: 0em 0 1em 0;
font-weight: 600; }
font-size: 1.5rem;
line-height: 1.75rem;
margin-bottom: 1.75rem;
font-weight: 600;
}
h5 {
font-size: 1.33333em;
line-height: 1em;
padding: 0.1em 0 1.13333em 0;
font-weight: 600; }
font-size: 1.333333rem;
line-height: 1.75rem;
margin-bottom: 1.75rem;
font-weight: 600;
}
h6 {
font-size: 1.1em;
line-height: 1.4em;
padding: 0.1em 0 1.2em 0;
font-weight: 600; }
font-size: 1.1rem;
line-height: 1.75rem;
margin-bottom: 1.75rem;
font-weight: 600;
}
/* ------------------ HR ------------------- */
hr {
@ -211,47 +219,65 @@ hr {
border-bottom: 1px;
border-color: rgba(1, 1, 1, 0.15);
border-style: solid;
margin: 1.5em; }
padding: 0;
margin: 0;
margin-bottom: 1.75rem;
}
/* ------------------ QUOTE ------------------- */
blockquote {
border-width: 0 0 0 0.2em;
border-width: 0 0 0 0.4375rem;
border-style: solid;
border-radius: 3px;
margin: -0.75em -0.2em 0.75em -0.2em;
padding: 0.75em 1em 0.75em 1em;
border-radius: 0.21875rem;
margin: 0;
margin-bottom: 1.75rem;
padding: 1.75rem;
font-size: 1.1rem;
max-width: 100%;
border-color: rgba(1, 1, 1, 0.15); }
.night-mode blockquote {
border-color: rgba(255, 255, 255, 0.15); }
overflow: auto;
border-color: rgba(1, 1, 1, 0.15);
}
.night-mode blockquote {
border-color: rgba(255, 255, 255, 0.15);
}
pre {
border-width: 0 0 0 0.2em;
border-width: 0 0 0 0.4375rem;
border-style: solid;
border-radius: 3px;
margin: -0.75em -0.2em 0.75em -0.2em;
padding: 0.75em 1em 0.75em 1em;
border-radius: 0.21875rem;
margin: 0;
margin-bottom: 1.75rem;
padding: 1.75rem;
font-size: 1.1rem;
max-width: 100%;
overflow: auto;
border-color: rgba(1, 1, 1, 0.2);
background-color: #EEE;
overflow-x: scroll; }
.night-mode pre {
background-color: #222;
border-color: rgba(255, 255, 255, 0.2); }
}
.night-mode pre {
background-color: #222;
border-color: rgba(255, 255, 255, 0.2);
}
/* ------------------ SPECIAL STYLING ------------------- */
mark {
border-radius: 0.2em;
padding: 0 0.2em 0 0.2em;
padding: 0 0.4375rem 0 0.4375rem;
background-color: rgba(255, 255, 0, 0.33);
color: inherit; }
color: inherit;
}
.night-mode mark {
background-color: rgba(128, 128, 0, 0.66); }
background-color: rgba(128, 128, 0, 0.66);
}
/* ------------------ SPECIAL STYLING ------------------- */
.time {
font-style: italic;
text-align: right;
width: 100%;
display: block; }
display: block;
font-size: 0.9rem;
}
/*# sourceMappingURL=clear-typography.css.map */

View File

@ -0,0 +1 @@
{"version":3,"sourceRoot":"","sources":["../scss/_font-face.scss","../scss/clear-typography.scss"],"names":[],"mappings":"AAAA;AAEA;EACI;EACA;EACA;EAKA;EACA;;AAGJ;EACI;EACA;EACA;EAKA;EACA;;AAGJ;EACI;EACA;EACA;EAKA;EACA;;AAGJ;EACI;EACA;EACA;EAKA;EACA;;AAGJ;EACI;EACA;EACA;EAKA;EACA;;AAGJ;EACI;EACA;EACA;EAKA;EACA;;AAGJ;EACI;EACA;EACA;EAKA;EACA;;AAGJ;EACI;EACA;EACA;EAKA;EACA;;AAGJ;EACI;EACA;EACA;EAKA;EACA;;AAGJ;EACI;EACA;EACA;EAKA;EACA;;ACvGJ;EACC;EACA;EACA,WAhBY;;;AAmBb;EACC,aAfY;EAgBZ;EACA;;;AAGD;EACE;EACA;EACA;;;AAGF;EACE;;;AAGF;EACC;;;AAGD;EACC;;;AAGD;EACE;EACA;;;AAGF;EAxCE;EACA;EACA,eALW;;AA6CX;EACE;;;AAIJ;EA/CE;EACA;EACA,eALW;;AAoDX;EACE;;AAEF;EACE,aAxDS;;;AA4Db;AAEA;EACE;EACA;EACA,aAjEW;EAkEX;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAIF;EAAc;EAAqB;;;AACnC;EAAmB;EAAqB;;;AAExC;AAEA;EACE;EACA;;;AAGF;AAUA;EACE;EACD,WA3GY;EA4GZ,aAvGY;EAwGZ;EACA;EACA;;;AAGD;EAfC;EACA;EACA,eAhGY;EAiGZ,aAa2B;;;AAG5B;EAnBC;EACA;EACA,eAhGY;EAiGZ,aAiBmB;;;AAGpB;EAvBC;EACA;EACA,eAhGY;EAiGZ,aAqBqB;;;AAGtB;EA3BC;EACA;EACA,eAhGY;EAiGZ,aAyBqB;;;AAGtB;EA/BC;EACA;EACA,eAhGY;EAiGZ,aA6B0B;;;AAG3B;EAnCC;EACA;EACA,eAhGY;EAiGZ,aAiCqB;;;AAGtB;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,eAhJW;;;AAmJb;AAeA;EAZE;EACD;EACA;EACA;EACA,eA1JY;EA2JZ,SA3JY;EA4JT;EAEH;EACG;EAKH;;AAEA;EACG;;;AAIJ;EArBE;EACD;EACA;EACA;EACA,eA1JY;EA2JZ,SA3JY;EA4JT;EAEH;EACG;EAcH;EACA;;AAEA;EACG;EACA;;;AAMJ;AAEA;EACE;EACA;EAEA;EACA;;;AAGF;EACE;;;AAGF;AAEA;EACC;EACA;EACA;EACA;EACG","file":"clear-typography.css"}

View File

@ -1,140 +0,0 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Ma Page de test</title>
<!-- meta -->
<meta name="description" content="">
<meta name="author" content="">
<!-- mon icon -->
<link rel="shortcut icon" href="favicon.ico">
<!-- framework utilisés -->
<link href="css/clear-typography.css" rel="stylesheet">
</head>
<body>
<article class="text-wrapper debug size-920">
<h1>
Titre de niveau 1
</h1>
<div class="time"><time> Le vendredi 19 septembre 2014 à 07:16 </time></div>
<h2>
Titre de niveau 2
</h2>
<p>
<em>
Lorem ipsum dolor sit amet
<sup>
<a href="#1">
[1]
</a>
</sup>
, consectetur adipiscing elit. Praesent varius ullamcorper diam, non sagittis lectus rutrum id. Integer eros urna, egestas et libero a, finibus egestas odio. Nunc vel hendrerit quam, eget malesuada sem. Sed hendrerit ligula pharetra leo aliquam volutpat. Integer auctor urna ac convallis laoreet. Nunc vestibulum ipsum sed tortor aliquam porta. Cras nunc est, lobortis in est at, rhoncus auctor nunc. Sed dignissim erat non sollicitudin ultricies. Integer vel consectetur urna. Etiam fermentum ligula vitae nunc viverra, a fringilla sem aliquam. Suspendisse potenti. Morbi sem mi, malesuada quis odio vitae, suscipit congue metus. Sed ut ullamcorper urna, eget molestie est. Sed pulvinar justo ac urna consectetur fringilla. Donec tristique eget leo sit amet mollis.
</em>
</p>
<ul>
<li>
1 - Element de liste
<ul>
<li>
1.1 - Element de liste
</li>
<li>
1.2 - Element de liste
<ul>
<li>
1.2.1 - Element de liste
<ul>
<li>
1.2.1.1 - Element de liste
</li>
</ul>
</li>
</ul>
</li>
<li>
1.3 - Element de liste
</li>
</ul>
</li>
<li>
2 - Element de liste
</li>
</ul>
<h3>
Titre de niveau 3
</h3>
<p>
Test de citation :
</p>
<blockquote>
<p>
Cras malesuada, metus at viverra molestie, mi ligula sodales tellus, vitae facilisis ante est vitae dolor. Donec feugiat non est eget elementum. Nullam in erat et arcu tincidunt maximus. Nullam nibh orci, egestas eu ex non, viverra pretium magna. Proin convallis, risus eu condimentum luctus, ante dui mattis eros, a varius risus diam sed nisl. Ut malesuada ipsum in augue accumsan ullamcorper. Phasellus efficitur augue in venenatis sollicitudin. Integer at consectetur arcu.
</p>
</blockquote>
<h4>
Titre de niveau 4
</h4>
<p>
Proin bibendum felis sit amet nisl iaculis,
<strong>
vel blandit purus dictum
</strong>
. Maecenas ullamcorper tortor ac dolor pulvinar, id imperdiet arcu suscipit.
<mark>
Sed posuere lectus eu orci tristique maximus</mark>. Nulla facilisi. Aenean sed fermentum nisl. Donec sodales ligula eu est finibus, eu posuere ligula condimentum. Morbi arcu magna, varius id justo ac, aliquam luctus magna. Pellentesque a velit et ipsum euismod congue eget eu sem. Nulla luctus est nec arcu volutpat blandit.
</p>
<p>
Quisque egestas, elit eu tempus tincidunt, mi libero porta purus, eget lobortis metus erat a dolor. Integer ac turpis lacinia, interdum nisl non, feugiat libero. Sed auctor quam turpis, quis volutpat lectus consectetur at.
<del>
Vestibulum tristique tellus eu nibh feugiat malesuada eu vitae diam.
</del>
Aenean mi leo, suscipit nec euismod vel, suscipit eu elit. Duis pharetra lectus risus, eget gravida felis mattis ac. Sed vitae arcu purus.
</p>
<h4>
Titre de niveau 4
</h4>
<h5>
Titre de niveau 5
</h5>
<p>
Integer enim diam, venenatis sit amet ex ut, tincidunt ullamcorper erat. Cras sodales nibh quis nunc sodales, a pulvinar lacus eleifend. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut feugiat quam scelerisque, tempus ex et, volutpat ante. Pellentesque facilisis sapien non odio tempus, eget ultricies augue porttitor. Donec elementum tincidunt eros et accumsan. Nam nec lacinia est. Quisque erat mauris, sagittis nec nulla ac, convallis tempus nulla. Phasellus ligula nisl, vulputate id dapibus in, efficitur ut sapien. Suspendisse dapibus diam sit amet egestas pellentesque. Nulla vel eleifend dui. Morbi nec interdum sem. Nullam fringilla tincidunt viverra. Integer sodales elementum quam, id malesuada magna vulputate ut.
</p>
<h6>
Titre de niveau 6
</h6>
<p>
Proin rhoncus metus rhoncus, aliquam tellus et, interdum odio. Morbi porttitor commodo ullamcorper. Sed iaculis orci id nunc porta tristique. Morbi auctor neque vitae suscipit pellentesque. Maecenas id lacinia leo, nec dictum leo. Aliquam cursus semper quam, vel bibendum tellus commodo sit amet. Vestibulum et iaculis justo, nec tempor nibh. Integer eu felis neque.
</p>
<h4>
Titre de niveau 4
</h4>
<p>
Nullam iaculis viverra tristique. Proin nibh eros, eleifend euismod quam sit amet, auctor scelerisque libero. Suspendisse consequat porttitor leo id feugiat. Suspendisse pretium, erat nec vulputate scelerisque, lectus libero ultrices arcu, sed sagittis magna lectus vitae purus. Aliquam pharetra tincidunt nibh nec rutrum. Maecenas fringilla ultrices suscipit. Praesent mattis risus non orci vestibulum, vulputate dapibus velit mollis. Quisque sagittis odio velit, vel dapibus turpis commodo nec. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Integer sit amet posuere ligula. Vestibulum commodo nulla eget nibh luctus, a interdum leo lacinia. Nullam mattis aliquet mauris sed tincidunt. Mauris et velit elementum, facilisis turpis in, viverra orci. Aenean ac lorem ullamcorper, bibendum ipsum sit amet, volutpat magna. Nam pellentesque venenatis ligula sed sagittis. Maecenas porttitor blandit magna sed posuere.
</p>
<h3>
Titre de niveau 3
</h3>
<p>
Mauris a cursus sem, in tempus odio. Curabitur ut ullamcorper enim. In faucibus odio ac arcu pharetra, ac condimentum ex ultricies. Aenean vestibulum eu lacus ac luctus. In in metus libero. Aliquam erat volutpat. Suspendisse quis ultrices odio. Nulla maximus faucibus lobortis.
</p>
<pre><code>Vivamus tincidunt dolor quis consectetur dapibus.
Ut metus risus, lobortis non venenatis in, ultricies a orci.
In suscipit ante et aliquet pretium.
Integer diam dui, rutrum vitae risus ultricies, varius vulputate magna.
In id suscipit elit.
</code></pre>
<hr/>
<p>
[1] : Sed et odio volutpat, convallis est et, interdum sapien.
</p>
</article>
</body>
</html>

View File

@ -17,12 +17,12 @@
</head>
<body style="max-width:1200px;padding:20px;margin:auto;">
<body class="text-wrapper debug">
<h1>
Document de Test
</h1>
<div class="time"><time> Le vendredi 19 septembre 2014 à 07:16 </time></div>
<time class="time"> Le vendredi 19 septembre 2014 à 07:16 </time>
<h2>
Introduction : Lorem Ipsum

View File

@ -1,22 +1,37 @@
@import 'font-face';
/* ------------------ GLOBAL STYLE ------------------- */
// Change these two variables for styling
$baseheight: 18px;
$baseline: 1.75;
// Don't change this one, it's just to
// make code more readable
$lineheight: $baseline * 1rem;
@mixin paragraph() {
padding:0;
padding-bottom:1.5em;
margin:0;
margin-bottom: $lineheight;
}
html {
font-family: OpenSans, sans-serif;
text-align: left;
font-size: $baseheight;
}
body {
font-family: OpenSans, sans-serif;
text-align: left;
font-size: 4mm;
line-height: 1.5em;
line-height: $lineheight;
color: #444;
font-weight: 400;
}
.debug {
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0, rgba(255, 255, 255, 0) 1px);
background-repeat: repeat-y;
background-size: 100% $lineheight;
}
.night-mode {
color:#BBB;
}
@ -34,31 +49,40 @@ a {
text-decoration:none;
}
p {
p, time {
@include paragraph();
&:last-child {
padding-bottom:0;
margin-bottom:0;
}
}
ul {
ul, ol {
@include paragraph();
ul {
padding-bottom:0;
margin-bottom:0;
}
li {
margin-left:1.5em;
margin-left: $lineheight;
}
}
ol {
@include paragraph();
ol {
padding-bottom:0;
}
li {
margin-left:1.5em;
}
/* sup, sub */
sup, sub {
margin:0;
padding:0;
line-height:$lineheight;
font-size: 0.8rem;
vertical-align:baseline;
position:relative;
}
sup {
top: -$lineheight/4;
}
sub {
top: $lineheight/4;
}
@ -68,114 +92,80 @@ ol {
/* ------------------ WRAPPERS ------------------- */
.text-wrapper {
font-size: calc(2.5mm + 1vw);
width:$baseheight*40;
margin: auto;
line-height: 1.5em;
&.debug {
background-image: -webkit-linear-gradient(hsla(0,0%,0%,0) 95%, hsla(0,25%,50%,.5) 95%);
background-image: -moz-linear-gradient(hsla(0,0%,0%,0) 95%, hsla(0,25%,50%,.5) 95%);
background-image: -ms-linear-gradient(hsla(0,0%,0%,0) 95%, hsla(0,25%,50%,.5) 95%);
background-image: -o-linear-gradient(hsla(0,0%,0%,0) 95%, hsla(0,25%,50%,.5) 95%);
background-image: linear-gradient(hsla(0,0%,0%,0) 95%, hsla(0,25%,50%,.5) 95%);
background-position: 50% 0;
background-size: 1.5em 1.5em;
}
}
@media screen and (min-width: 640px) {
.text-wrapper.size-640 {
max-width: 640px;
font-size: calc(2.5mm + 6.4px);
}
}
@media screen and (min-width: 800px) {
.text-wrapper.size-800 {
font-size: calc(2.5mm + 8.0px);
max-width: 800px;
}
}
@media screen and (min-width: 920px) {
.text-wrapper.size-920 {
font-size: calc(2.5mm + 9.2px);
max-width: 800px;
}
}
@media screen and (min-width: 1200px) {
.text-wrapper.size-1200 {
font-size: calc(2.5mm + 12px);
max-width: 800px;
}
}
/* ------------------ TITLES ------------------- */
@mixin title($size, $height, $top, $bottom, $weight) {
font-size: $size;
line-height: $height;
padding: $top 0 $bottom 0;
@mixin title($size, $weight) {
$height: ceil($size / $baseline) * $baseline;
font-size: $size * 1rem;
line-height: $height * 1rem;
margin-bottom: $lineheight;
font-weight: $weight;
}
h1, h2, h3, h4, h5, h6, h7 {
text-align: left;
font-size: 1em;
line-height: 1.5em;
font-size: $baseheight;
line-height: $lineheight;
padding:0;
margin:0;
font-weight:400;
}
h1 {
@include title(2.3333333em, 1em, 0.333333em, 0.6em, 700);
@include title(2.3333333, 700);
}
h2 {
@include title(2em, 1.5em, 0.333333em, 0.4em, 700);
@include title(2, 700);
}
h3 {
@include title(1.5em, 1em, 0em, 1em, 700);
@include title(1.5, 700);
}
h4 {
@include title(1.5em, 1em, 0em, 1em, 600);
@include title(1.5, 600);
}
h5 {
@include title(1.333333em, 1em, 0.1em, 1.133333em, 600);
@include title(1.333333, 600);
}
h6 {
@include title(1.1em, 1.4em, 0.1em, 1.2em, 600);
@include title(1.1, 600);
}
/* ------------------ HR ------------------- */
hr {
border-top: 0px;
border-left: 0px;
border-right: 0px;
border-bottom: 1px;
border-color: rgba(1,1,1,0.15);
border-style: solid;
margin: 1.5em;
border-top: 0px;
border-left: 0px;
border-right: 0px;
border-bottom: 1px;
border-color: rgba(1,1,1,0.15);
border-style: solid;
padding:0;
margin:0;
margin-bottom: $lineheight;
}
/* ------------------ QUOTE ------------------- */
@mixin well() {
border-width: 0 0 0 0.2em;
border-width: 0 0 0 $lineheight/4;
border-style: solid;
border-radius: 3px;
margin: -0.75em -0.2em 0.75em -0.2em;
padding: 0.75em 1em 0.75em 1em;
border-radius: $lineheight/8;
margin:0;
margin-bottom: $lineheight;
padding: $lineheight;
font-size:1.1rem;
max-width: 100%;
overflow: auto;
}
blockquote {
@ -191,7 +181,6 @@ pre {
@include well();
border-color: rgba(1,1,1,0.20);
background-color:#EEE;
overflow-x: scroll;
.night-mode & {
background-color:#222;
@ -205,7 +194,7 @@ pre {
mark {
border-radius: 0.2em;
padding:0 0.2em 0 0.2em;
padding:0 $lineheight/4 0 $lineheight/4;
background-color:rgba(255,255,0,0.33);
color: inherit;
@ -222,4 +211,5 @@ mark {
text-align: right;
width: 100%;
display: block;
font-size: 0.9rem;
}