1
0
mirror of https://github.com/thangisme/notes.git synced 2024-12-22 09:46:39 -05:00
notes/_sass/content.scss

232 lines
3.2 KiB
SCSS
Raw Normal View History

@charset "UTF-8";
2017-03-24 09:47:37 -04:00
//
// Styles for rendered markdown in the .main-content container
//
2018-11-15 16:17:29 -05:00
// stylelint-disable selector-no-type, max-nesting-depth, selector-max-compound-selectors, selector-max-type
2017-03-24 09:47:37 -04:00
.main-content {
line-height: $content-line-height;
2019-08-14 10:07:45 -04:00
2020-05-05 12:48:45 -04:00
ol,
ul,
dl,
pre,
address,
blockquote,
.table-wrapper {
margin-top: 0.5em;
}
2018-11-16 14:54:46 -05:00
a {
2018-11-16 15:04:31 -05:00
overflow: hidden;
2018-11-16 14:54:46 -05:00
text-overflow: ellipsis;
white-space: nowrap;
}
2017-03-24 09:47:37 -04:00
ul,
ol {
2017-03-24 09:47:37 -04:00
padding-left: 1.5em;
}
2020-05-05 12:48:45 -04:00
li {
.highlight {
margin-top: $sp-1;
}
}
2017-03-24 09:47:37 -04:00
ol {
list-style-type: none;
counter-reset: step-counter;
2019-02-02 18:43:14 -05:00
> li {
2017-03-24 09:47:37 -04:00
position: relative;
&::before {
position: absolute;
2017-03-26 21:09:19 -04:00
top: 0.2em;
left: -1.6em;
2017-03-24 09:47:37 -04:00
color: $grey-dk-000;
2017-03-26 21:09:19 -04:00
content: counter(step-counter);
counter-increment: step-counter;
2017-03-24 09:47:37 -04:00
@include fs-3;
2017-03-26 21:09:19 -04:00
@include mq(sm) {
top: 0.11em;
}
2017-03-24 09:47:37 -04:00
}
ol {
counter-reset: sub-counter;
li {
&::before {
content: counter(sub-counter, lower-alpha);
2017-03-26 21:09:19 -04:00
counter-increment: sub-counter;
2017-03-24 09:47:37 -04:00
}
}
}
}
}
2017-04-08 18:51:14 -04:00
ul {
list-style: none;
2019-02-02 18:43:14 -05:00
> li {
2017-04-08 18:51:14 -04:00
&::before {
position: absolute;
margin-left: -1.4em;
2017-04-08 18:51:14 -04:00
color: $grey-dk-000;
content: "";
}
}
}
2018-11-16 10:56:50 -05:00
.task-list {
padding-left: 0;
}
.task-list-item {
display: flex;
align-items: center;
2018-11-16 11:49:29 -05:00
2018-11-16 10:56:50 -05:00
&::before {
content: "";
}
}
.task-list-item-checkbox {
margin-right: 0.6em;
}
2018-10-23 11:39:48 -04:00
hr + * {
2017-03-24 09:47:37 -04:00
margin-top: 0;
}
2018-10-23 11:39:48 -04:00
h1:first-of-type {
margin-top: 0.5em;
}
2018-10-24 08:52:27 -04:00
dl {
display: grid;
grid-template: auto / 10em 1fr;
}
dt,
dd {
margin: 0.25em 0;
}
dt {
grid-column: 1;
font-weight: 500;
2020-08-03 13:54:58 -04:00
text-align: right;
&::after {
content: ":";
}
}
dd {
grid-column: 2;
margin-bottom: 0;
2020-08-03 13:54:58 -04:00
margin-left: 1em;
blockquote,
div,
dl,
dt,
h1,
h2,
h3,
h4,
h5,
h6,
li,
ol,
p,
pre,
table,
ul,
.table-wrapper {
&:first-child {
margin-top: 0;
}
}
}
2020-09-29 11:27:59 -04:00
2020-09-29 11:25:34 -04:00
dd,
ol,
ul {
dl:first-child {
dt:first-child,
dd:nth-child(2) {
margin-top: 0;
}
}
}
2019-08-13 16:23:38 -04:00
2020-09-29 11:25:34 -04:00
.anchor-heading {
position: absolute;
right: -$sp-4;
width: $sp-5;
height: 100%;
padding-right: $sp-1;
padding-left: $sp-1;
overflow: visible;
@include mq(md) {
right: auto;
left: -$sp-5;
}
svg {
display: inline-block;
width: 100%;
height: 100%;
color: $link-color;
visibility: hidden;
}
}
.anchor-heading:hover,
2019-08-13 16:23:38 -04:00
h1:hover > .anchor-heading,
h2:hover > .anchor-heading,
h3:hover > .anchor-heading,
h4:hover > .anchor-heading,
h5:hover > .anchor-heading,
h6:hover > .anchor-heading {
svg {
visibility: visible;
}
2019-08-13 16:23:38 -04:00
}
summary {
cursor: pointer;
}
2019-08-13 16:23:38 -04:00
h1,
h2,
h3,
h4,
h5,
h6 {
position: relative;
2020-05-05 12:48:45 -04:00
margin-top: 1.5em;
margin-bottom: 0.25em;
2020-05-01 17:32:33 -04:00
&:first-child {
2020-05-05 12:48:45 -04:00
margin-top: $sp-2;
}
+ table,
+ .table-wrapper,
+ .code-example,
+ .highlighter-rouge {
margin-top: 1em;
}
+ p {
2020-05-01 17:32:33 -04:00
margin-top: 0;
}
}
2017-03-24 09:47:37 -04:00
}