kobold.city-old/scss/_typography.scss

190 lines
2.7 KiB
SCSS
Raw Normal View History

2019-03-25 11:02:54 +01:00
@import 'font-face';
2020-04-28 19:35:38 +02:00
/* ------------------ GLOBAL STYLE ------------------- */
2019-03-25 11:02:54 +01:00
@mixin paragraph() {
padding:0;
2020-04-28 19:35:38 +02:00
margin:0;
margin-bottom: $baseline * 1rem;
2019-03-25 11:02:54 +01:00
}
2020-04-28 19:35:38 +02:00
html {
2019-03-25 11:02:54 +01:00
font-family: OpenSans, sans-serif;
text-align: left;
2020-04-28 19:35:38 +02:00
font-size: $baseheight;
}
body {
line-height: $baseline * 1rem;
color: #444;
2019-03-25 11:02:54 +01:00
font-weight: 400;
}
.night-mode {
color:#BBB;
}
strong {
font-weight: 600;
}
em {
font-style: italic;
}
a {
2020-04-28 19:35:38 +02:00
color:#2484c1;
2019-03-25 11:02:54 +01:00
text-decoration:none;
}
p {
@include paragraph();
&:last-child {
2020-04-28 19:35:38 +02:00
margin-bottom:0;
2019-03-25 11:02:54 +01:00
}
}
ul {
@include paragraph();
ul {
2020-04-28 19:35:38 +02:00
margin-bottom:0;
2019-03-25 11:02:54 +01:00
}
li {
2020-04-28 19:35:38 +02:00
margin-left: $baseline * 1rem;
2019-03-25 11:02:54 +01:00
}
}
ol {
@include paragraph();
ol {
2020-04-28 19:35:38 +02:00
margin-bottom:0;
2019-03-25 11:02:54 +01:00
}
li {
2020-04-28 19:35:38 +02:00
margin-left: $baseline * 1rem;
2019-03-25 11:02:54 +01:00
}
}
2020-04-28 19:35:38 +02:00
::selection { background: #2484c1; color: #fff; }
::-moz-selection { background: #2484c1; color: #fff; }
2019-03-25 11:02:54 +01:00
2020-04-28 19:35:38 +02:00
/* ------------------ WRAPPERS ------------------- */
2019-03-25 11:02:54 +01:00
2020-04-28 19:35:38 +02:00
.text-wrapper {
width:$baseheight*40;
margin: auto;
2019-03-25 11:02:54 +01:00
}
2020-04-28 19:35:38 +02:00
/* ------------------ TITLES ------------------- */
2019-03-25 11:02:54 +01:00
2020-04-28 19:35:38 +02:00
@mixin title($size, $weight) {
$height: ceil($size / $baseline) * $baseline;
font-size: $size * 1rem;
line-height: $height * 1rem;
margin-bottom: $baseline * 1rem;
2019-03-25 11:02:54 +01:00
font-weight: $weight;
}
h1, h2, h3, h4, h5, h6, h7 {
text-align: left;
2020-04-28 19:35:38 +02:00
font-size: 1em;
line-height: 1.5em;
2019-03-25 11:02:54 +01:00
padding:0;
margin:0;
font-weight:400;
}
h1 {
2020-04-28 19:35:38 +02:00
@include title(2.3333333, 700);
2019-03-25 11:02:54 +01:00
}
h2 {
2020-04-28 19:35:38 +02:00
@include title(2, 700);
2019-03-25 11:02:54 +01:00
}
h3 {
2020-04-28 19:35:38 +02:00
@include title(1.5, 700);
2019-03-25 11:02:54 +01:00
}
h4 {
2020-04-28 19:35:38 +02:00
@include title(1.5, 600);
2019-03-25 11:02:54 +01:00
}
h5 {
2020-04-28 19:35:38 +02:00
@include title(1.333333, 600);
2019-03-25 11:02:54 +01:00
}
h6 {
2020-04-28 19:35:38 +02:00
@include title(1.1, 600);
2019-03-25 11:02:54 +01:00
}
2020-04-28 19:35:38 +02:00
/* ------------------ HR ------------------- */
2019-03-25 11:02:54 +01:00
hr {
border-top: 0px;
border-left: 0px;
border-right: 0px;
border-bottom: 1px;
border-color: rgba(1,1,1,0.15);
border-style: solid;
2020-04-28 19:35:38 +02:00
margin-bottom: $baseline * 1rem;
2019-03-25 11:02:54 +01:00
}
2020-04-28 19:35:38 +02:00
/* ------------------ QUOTE ------------------- */
2019-03-25 11:02:54 +01:00
@mixin well() {
border-width: 0 0 0 0.2em;
border-style: solid;
border-radius: 3px;
2020-04-28 19:35:38 +02:00
margin:0;
margin-bottom: $baseline * 1rem;
padding: $baseline/2 * 1rem;
2019-03-25 11:02:54 +01:00
max-width: 100%;
}
2020-04-28 19:35:38 +02:00
blockquote {
2019-03-25 11:02:54 +01:00
@include well();
2020-04-28 19:35:38 +02:00
border-color: rgba(1, 1, 1, 0.15);
.night-mode & {
border-color: rgba(255, 255, 255, 0.15)
}
2019-03-25 11:02:54 +01:00
}
2020-04-28 19:35:38 +02:00
pre {
2019-03-25 11:02:54 +01:00
@include well();
2020-04-28 19:35:38 +02:00
border-color: rgba(1,1,1,0.20);
2019-03-25 11:02:54 +01:00
background-color:#EEE;
2020-04-28 19:35:38 +02:00
2019-03-25 11:02:54 +01:00
.night-mode & {
background-color:#222;
border-color:rgba(255,255,255,0.20);
}
}
2020-04-28 19:35:38 +02:00
/* ------------------ SPECIAL STYLING ------------------- */
2019-03-25 11:02:54 +01:00
mark {
border-radius: 0.2em;
padding:0 0.2em 0 0.2em;
2020-04-28 19:35:38 +02:00
background-color:rgba(255,255,0,0.33);
2019-03-25 11:02:54 +01:00
color: inherit;
}
.night-mode mark {
2020-04-28 19:35:38 +02:00
background-color:rgba(128,128,0,0.66);
2019-03-25 11:02:54 +01:00
}
2020-04-28 19:35:38 +02:00
/* ------------------ SPECIAL STYLING ------------------- */
2019-03-25 11:02:54 +01:00
.time {
font-style: italic;
text-align: right;
width: 100%;
display: block;
}