From e7ed01381dce4fccff2ad0a98b48486fdd4c0e6c Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Mon, 4 Nov 2019 15:57:00 +0100 Subject: [PATCH] fix: rework entirely titles --- css/clear-typography.css | 27 +++++++++++++-------------- css/clear-typography.css.map | 2 +- scss/clear-typography.scss | 19 ++++++++++--------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/css/clear-typography.css b/css/clear-typography.css index 1b6bc35..0bf90a9 100644 --- a/css/clear-typography.css +++ b/css/clear-typography.css @@ -193,43 +193,43 @@ h1, h2, h3, h4, h5, h6, h7 { } h1 { - font-size: 2.3333333em; - line-height: 1em; + font-size: 2.3333333rem; + line-height: 3rem; margin-bottom: 1.5rem; font-weight: 700; } h2 { - font-size: 2em; - line-height: 1.5em; + font-size: 2rem; + line-height: 3rem; margin-bottom: 1.5rem; font-weight: 700; } h3 { - font-size: 1.5em; - line-height: 1em; + font-size: 1.5rem; + line-height: 1.5rem; margin-bottom: 1.5rem; font-weight: 700; } h4 { - font-size: 1.5em; - line-height: 1em; + font-size: 1.5rem; + line-height: 1.5rem; margin-bottom: 1.5rem; font-weight: 600; } h5 { - font-size: 1.333333em; - line-height: 1em; + font-size: 1.333333rem; + line-height: 1.5rem; margin-bottom: 1.5rem; font-weight: 600; } h6 { - font-size: 1.1em; - line-height: 1.4em; + font-size: 1.1rem; + line-height: 1.5rem; margin-bottom: 1.5rem; font-weight: 600; } @@ -242,7 +242,7 @@ hr { border-bottom: 1px; border-color: rgba(1, 1, 1, 0.15); border-style: solid; - margin: 1.5em; + margin-bottom: 1.5rem; } /* ------------------ QUOTE ------------------- */ @@ -255,7 +255,6 @@ blockquote { padding: 0.75rem; max-width: 100%; border-color: rgba(1, 1, 1, 0.15); - font-size: 1.1rem; } .night-mode blockquote { border-color: rgba(255, 255, 255, 0.15); diff --git a/css/clear-typography.css.map b/css/clear-typography.css.map index 4ddb0c8..c9f3898 100644 --- a/css/clear-typography.css.map +++ b/css/clear-typography.css.map @@ -1 +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;;ACrHJ;AAWA;EACC;EACA;EACA,WAXY;;;AAcb;EACC;EACA;EACA;;;AAGD;EACE;;;AAGF;EACC;;;AAGD;EACC;;;AAGD;EACE;EACA;;;AAGF;EAlCE;EACA;EACA;;AAkCA;EACE;;;AAIJ;EAzCE;EACA;EACA;;AAyCA;EACE;;AAEF;EACE;;;AAIJ;EAnDE;EACA;EACA;;AAmDA;EACE;;AAEF;EACE;;;AAKJ;EAAc;EAAqB;;;AACnC;EAAmB;EAAqB;;;AAExC;AAEA;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIJ;EACE;IACE;IACA;;;AAIJ;EACE;IACE;IACA;;;AAIJ;EACE;IACE;IACA;;;AAIJ;EACE;IACE;IACA;;;AAIJ;AASA;EACE;EACD;EACA;EACA;EACA;EACA;;;AAGD;EAfC,WAgBgB;EAfhB,aAe6B;EAd7B;EACA,aAaqD;;;AAGtD;EAnBC,WAoBgB;EAnBhB,aAmBqB;EAlBrB;EACA,aAiB+C;;;AAGhD;EAvBC,WAwBgB;EAvBhB,aAuBuB;EAtBvB;EACA,aAqBsC;;;AAGvC;EA3BC,WA4BgB;EA3BhB,aA2BuB;EA1BvB;EACA,aAyBsC;;;AAGvC;EA/BC,WAgCgB;EA/BhB,aA+B4B;EA9B5B;EACA,aA6BoD;;;AAGrD;EAnCC,WAoCgB;EAnChB,aAmCuB;EAlCvB;EACA,aAiC4C;;;AAG7C;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;AAaA;EAVE;EACD;EACA;EACA;EACA;EACA;EAEA;EAKA;EACG;;AAEH;EACG;;;AAIJ;EApBE;EACD;EACA;EACA;EACA;EACA;EAEA;EAeA;EACA;;AAEA;EACG;EACA;;;AAMJ;AAEA;EACE;EACA;EAEA;EACA;;;AAGF;EACE;;;AAGF;AAEA;EACC;EACA;EACA;EACA","file":"clear-typography.css"} \ No newline at end of file +{"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;;ACrHJ;AAWA;EACC;EACA;EACA,WAXY;;;AAcb;EACC;EACA;EACA;;;AAGD;EACE;;;AAGF;EACC;;;AAGD;EACC;;;AAGD;EACE;EACA;;;AAGF;EAlCE;EACA;EACA;;AAkCA;EACE;;;AAIJ;EAzCE;EACA;EACA;;AAyCA;EACE;;AAEF;EACE;;;AAIJ;EAnDE;EACA;EACA;;AAmDA;EACE;;AAEF;EACE;;;AAKJ;EAAc;EAAqB;;;AACnC;EAAmB;EAAqB;;;AAExC;AAEA;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIJ;EACE;IACE;IACA;;;AAIJ;EACE;IACE;IACA;;;AAIJ;EACE;IACE;IACA;;;AAIJ;EACE;IACE;IACA;;;AAIJ;AAUA;EACE;EACD;EACA;EACA;EACA;EACA;;;AAGD;EAfC;EACA;EACA;EACA,aAa2B;;;AAG5B;EAnBC;EACA;EACA;EACA,aAiBmB;;;AAGpB;EAvBC;EACA;EACA;EACA,aAqBqB;;;AAGtB;EA3BC;EACA;EACA;EACA,aAyBqB;;;AAGtB;EA/BC;EACA;EACA;EACA,aA6B0B;;;AAG3B;EAnCC;EACA;EACA;EACA,aAiCqB;;;AAGtB;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;AAaA;EAVE;EACD;EACA;EACA;EACA;EACA;EAEA;EAKA;;AAEA;EACG;;;AAIJ;EAnBE;EACD;EACA;EACA;EACA;EACA;EAEA;EAcA;EACA;;AAEA;EACG;EACA;;;AAMJ;AAEA;EACE;EACA;EAEA;EACA;;;AAGF;EACE;;;AAGF;AAEA;EACC;EACA;EACA;EACA","file":"clear-typography.css"} \ No newline at end of file diff --git a/scss/clear-typography.scss b/scss/clear-typography.scss index 99b550e..78c6b5e 100644 --- a/scss/clear-typography.scss +++ b/scss/clear-typography.scss @@ -119,9 +119,10 @@ ol { /* ------------------ TITLES ------------------- */ -@mixin title($size, $height, $top, $bottom, $weight) { - font-size: $size; - line-height: $height; +@mixin title($size, $weight) { + $height: ceil($size / $baseline) * $baseline; + font-size: $size * 1rem; + line-height: $height * 1rem; margin-bottom: $baseline * 1rem; font-weight: $weight; } @@ -136,27 +137,27 @@ h1, h2, h3, h4, h5, h6, h7 { } 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 ------------------- */