maggioni.xyz/_sass/_base.scss

186 lines
2.6 KiB
SCSS
Raw Normal View History

2021-01-20 14:27:52 +00:00
/* vim: set ts=2 sw=2 et tw=80: */
2018-10-23 14:38:45 +00:00
/* Reset some basic elements */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
hr,
dl,
dd,
ol,
ul,
figure {
2021-01-20 14:27:52 +00:00
margin: 0;
padding: 0;
2016-07-07 19:05:01 +00:00
}
2018-10-23 14:38:45 +00:00
/* Basic styling */
2021-01-22 17:49:05 +00:00
html {
2021-01-20 14:27:52 +00:00
font-weight: $base-font-weight;
font-size: $base-font-size;
line-height: $base-line-height;
font-family: $base-font-family;
color: $text-color;
background-color: $background-color;
2016-07-07 19:05:01 +00:00
}
2018-10-23 14:38:45 +00:00
/* Images */
2016-07-07 19:05:01 +00:00
img {
2021-01-20 14:27:52 +00:00
max-width: 100%;
vertical-align: middle;
2016-07-07 19:05:01 +00:00
}
2018-10-23 14:38:45 +00:00
/* Lists */
ul,
ol {
2021-01-20 14:27:52 +00:00
margin-left: $spacing-unit;
2016-07-07 19:05:01 +00:00
}
2018-10-23 14:38:45 +00:00
/* Disable margin for lists */
li > ul,
li > ol {
2021-01-20 14:27:52 +00:00
margin-bottom: 0;
2016-07-07 19:05:01 +00:00
}
2018-10-23 14:38:45 +00:00
/* Headings */
h2,
h3,
h4,
h5,
h6 {
2021-01-20 14:27:52 +00:00
font-weight: $base-font-weight;
2021-01-22 17:49:05 +00:00
text-decoration: underline;
2016-07-07 19:05:01 +00:00
}
2018-10-23 14:38:45 +00:00
/* Links */
2016-07-07 19:05:01 +00:00
a {
2021-01-22 17:49:05 +00:00
color: $brand-color;
2024-01-08 11:04:54 +00:00
background: $background-color;
2021-01-20 14:27:52 +00:00
text-decoration: none;
2021-01-22 17:49:05 +00:00
font-weight: bold;
2016-07-07 19:05:01 +00:00
2021-01-20 14:27:52 +00:00
&:visited {
}
2016-07-07 19:05:01 +00:00
2021-01-20 14:27:52 +00:00
&:hover {
text-decoration: underline;
}
2016-07-07 19:05:01 +00:00
}
/**
* Blockquotes
*/
blockquote {
2024-01-08 11:04:54 +00:00
color: white;
background: $top-col;
2021-01-22 17:49:05 +00:00
border-left: 4px solid $brand-color;
2021-01-20 14:27:52 +00:00
letter-spacing: -1px;
font-style: italic;
margin: 1rem 0;
padding: 1em;
> :last-child {
margin-bottom: 0;
}
2016-07-07 19:05:01 +00:00
}
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 {
2021-01-20 14:27:52 +00:00
margin: -8px -12px;
2018-10-23 14:38:45 +00:00
}
pre table.rouge-table td {
2021-01-20 14:27:52 +00:00
padding: 0;
2016-07-07 19:05:01 +00:00
}
pre {
2021-01-20 14:27:52 +00:00
padding: 8px 12px;
overflow-x: auto;
2016-07-07 19:05:01 +00:00
2021-01-20 14:27:52 +00:00
> code {
border: 0;
padding-right: 0;
padding-left: 0;
}
2016-07-07 19:05:01 +00:00
}
2018-10-24 11:53:55 +00:00
/* pull a nice monospace font from the internets, plus set font and
* background */
pre,
code {
2021-01-20 14:27:52 +00:00
font-size: 0.95rem;
2024-01-08 11:04:54 +00:00
background: $background-color;
2018-10-24 11:53:55 +00:00
}
2023-01-03 22:47:03 +00:00
a code {
2024-01-08 11:04:54 +00:00
background: $background-color;
2023-01-03 22:47:03 +00:00
}
2021-01-20 14:27:52 +00:00
/* Disable borders between line numbers and code when
2018-10-24 11:53:55 +00:00
* line numbers are shown */
code .rouge-table,
code .rouge-table td {
2021-01-20 14:27:52 +00:00
border: 0;
border-radius: 0;
2018-10-24 11:53:55 +00:00
}
code .rouge-table {
2021-01-20 14:27:52 +00:00
border-spacing: 0;
border-collapse: collapse;
2018-10-24 11:53:55 +00:00
}
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.4rem 2em;
2018-10-23 14:38:45 +00:00
}
2016-07-07 19:05:01 +00:00
2018-10-23 14:38:45 +00:00
/* Header sizes */
/**
* 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 {
2018-10-24 11:53:55 +00:00
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 */
p,
figure {
2018-10-23 14:38:45 +00:00
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: #faa;
2018-10-23 14:48:50 +00:00
}