spee.ch/client/scss/_markdown.scss
2019-02-04 00:50:31 -05:00

141 lines
2.2 KiB
SCSS

.markdown-preview {
// Headers
h1,
h2,
h3,
h4,
h5,
h6 {
font-size: inherit;
font-weight: 600;
margin-bottom: $tertiary-padding;
padding-top: $tertiary-padding;
}
// Paragraphs
p {
font-size: 1.15rem;
margin-bottom: $tertiary-padding;
white-space: pre-line;
svg {
width: 1rem;
height: 1rem;
margin-left: 0.2rem;
position: relative;
top: 1px;
}
}
blockquote {
border-radius: 8px;
background: $blockquote-background;
padding: $tertiary-padding;
min-width: 60%;
}
// Strikethrough text
del {
}
// Tables
table {
width: 100%;
margin-bottom: 1.2rem;
background-color: $base-color;
border-spacing: 0;
border: .5px solid $chrome-color;
tr {
td,
th,
td:first-of-type,
th:first-of-type,
td:last-of-type,
th:last-of-type {
padding: $thin-padding $tertiary-padding;
text-overflow: ellipsis;
}
td:last-of-type {
text-align: right;
}
th {
background: $chrome-color;
}
}
tr:nth-child(even){
background: $chrome-color;
}
}
// Image
img {
margin-bottom: $tertiary-padding;
margin-top: $tertiary-padding;
padding: $secondary-padding;
object-fit: scale-down;
max-width: 100%;
border: $subtle-border;
box-sizing: border-box;
}
// Horizontal Rule
hr {
width: 100%;
height: 1px;
background-color: $base-color;
margin-bottom: 2rem;
position: relative;
top: 1rem;
html[data-theme='dark'] & {
background-color: rgba($base-color, 0.2);
}
}
// Code
pre {
white-space: normal;
}
code {
margin-bottom: $tertiary-padding;
padding: $tertiary-padding;
background-color: $subtle-border-color;
color: $text-color;
display: block;
font-family: Consolas, 'Lucida Console', 'Source Sans', monospace;
}
a {
color: $primary-color;
display: inline-block;
}
// Lists
ul,
ol {
margin-bottom: $thin-padding;
> li {
list-style-position: outside;
}
}
ul {
list-style: initial;
}
li {
margin-left: $primary-padding;
p {
display: inline-block;
}
}
}