maggioni.xyz/_sass/_base.scss

163 lines
2.8 KiB
SCSS
Raw Normal View History

2018-10-23 14:38:45 +00:00
/* Reset some basic elements */
2016-07-07 19:05:01 +00:00
body, h1, h2, h3, h4, h5, h6,
p, blockquote, pre, hr,
dl, dd, ol, ul, figure {
margin: 0;
padding: 0;
}
2018-10-23 14:38:45 +00:00
/* Basic styling */
2016-07-07 19:05:01 +00:00
body {
2018-10-23 14:38:45 +00:00
font-weight: $base-font-weight;
font-size: $base-font-size;
line-height: $base-line-height;
font-family: $base-font-family;
2016-07-07 19:05:01 +00:00
color: $text-color;
background-color: $background-color;
}
2018-10-23 14:38:45 +00:00
/* Images */
2016-07-07 19:05:01 +00:00
img {
max-width: 100%;
vertical-align: middle;
}
2018-10-23 14:38:45 +00:00
/* Lists */
2016-07-07 19:05:01 +00:00
ul, ol {
margin-left: $spacing-unit;
}
2018-10-23 14:38:45 +00:00
/* Disable margin for lists */
li > ul, li > ol {
margin-bottom: 0;
2016-07-07 19:05:01 +00:00
}
2018-10-23 14:38:45 +00:00
/* Headings */
2016-07-07 19:05:01 +00:00
h1, h2, h3, h4, h5, h6 {
font-weight: $base-font-weight;
}
2018-10-23 14:38:45 +00:00
/* Links */
2016-07-07 19:05:01 +00:00
a {
color: $brand-color;
text-decoration: none;
&:visited {
color: darken($brand-color, 15%);
}
&:hover {
color: $text-color;
text-decoration: underline;
}
}
/**
* Blockquotes
*/
blockquote {
color: $grey-color;
border-left: 4px solid $grey-color-light;
font-size: 18px;
letter-spacing: -1px;
font-style: italic;
2018-10-24 11:53:55 +00:00
margin: 1rem 0;
padding: 1em;
2016-07-07 19:05:01 +00:00
> :last-child {
margin-bottom: 0;
}
}
2018-10-24 11:53:55 +00:00
/* do not put padding around the table with line numbers and the code */
2018-10-23 14:38:45 +00:00
code table {
margin: -8px -12px;
}
pre table.rouge-table td {
padding: 0;
2016-07-07 19:05:01 +00:00
}
pre {
padding: 8px 12px;
overflow-x: auto;
> code {
border: 0;
padding-right: 0;
padding-left: 0;
}
}
2018-10-24 11:53:55 +00:00
/* pull a nice monospace font from the internets, plus set font and
* background */
pre, code {
font-size: 0.95rem;
background: rgb(66,66,66);
font-family: "Source Code Pro", monospace;
}
/* Disable borders between line numbers and code when
* line numbers are shown */
code .rouge-table, code .rouge-table td {
border: 0;
border-radius: 0;
}
code .rouge-table {
border-spacing: 0;
border-collapse: collapse;
}
2016-07-07 19:05:01 +00:00
/**
2018-10-23 14:38:45 +00:00
* Basic layout rules
2016-07-07 19:05:01 +00:00
*/
2018-10-23 14:38:45 +00:00
/* Padding for the main content in the page */
.container {
padding: 0 4em;
}
2016-07-07 19:05:01 +00:00
2018-10-23 14:38:45 +00:00
/* Header sizes */
h1 { font-size: 3rem; margin-bottom: 1rem; }
h2 { font-size: 2.75rem; }
h3 { font-size: 2.4rem; }
h4 { font-size: 1.8rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.8rem; }
/**
* General style for the content inside main
*/
2018-10-24 11:53:55 +00:00
/* separate article metadata to the article itself with some space */
2018-10-23 14:38:45 +00:00
article .post-header {
margin-bottom: 3rem;
2016-07-07 19:05:01 +00:00
}
2018-10-23 14:38:45 +00:00
2018-10-24 11:53:55 +00:00
/* put some space at the end of each article and at the end of each section */
main article, main section {
margin-bottom: 2rem;
2018-10-23 14:38:45 +00:00
}
2018-10-24 11:53:55 +00:00
/* justify text */
2018-10-23 14:38:45 +00:00
p {
text-align: justify;
}
2018-10-24 11:53:55 +00:00
/* put a space between paragraphs and images */
2018-10-23 14:38:45 +00:00
p, figure {
margin-top: 1.2rem;
}
2018-10-24 11:53:55 +00:00
/* the first paragraph has no space at the top (since that is provided
* by either main or h? */
2018-10-23 14:38:45 +00:00
p:first-child {
margin-top: 0;
}
2018-10-24 11:53:55 +00:00
/* make strongly emphasized elements REALLY STRONG */
2018-10-23 14:48:50 +00:00
strong {
background: #aa2222;
}