spee.ch/client/scss/_markdown.scss

167 lines
2.6 KiB
SCSS
Raw Normal View History

2019-01-26 01:37:07 +01:00
.markdown-preview {
margin: $tertiary-padding 0px;
2019-01-26 01:37:07 +01:00
h1,
h2,
h3 {
2019-01-26 01:37:07 +01:00
font-size: inherit;
font-weight: inherit;
margin: $tertiary-padding 0px;
}
h4, h5, h6 {
font-size: $text-large;
2019-01-26 01:37:07 +01:00
font-weight: 600;
margin: $tertiary-padding 0px;
2019-01-26 01:37:07 +01:00
}
// Paragraphs
p {
font-size: 1.15rem;
white-space: pre-line;
margin: $tertiary-padding 0px;
2019-01-26 01:37:07 +01:00
svg {
width: 1rem;
height: 1rem;
margin-left: 0.2rem;
position: relative;
top: 1px;
}
}
2019-02-04 06:50:31 +01:00
blockquote {
background: $blockquote-background;
padding: $tertiary-padding;
min-width: 60%;
margin: $tertiary-padding;
p:first-child{
margin-top: 0px;
}
p:last-child {
margin-bottom: 0px;
}
div {
display: none;
}
2019-02-04 06:50:31 +01:00
}
2019-01-26 01:37:07 +01:00
// Strikethrough text
del {
}
// Tables
table {
2019-02-04 06:50:31 +01:00
width: 100%;
2019-01-26 01:37:07 +01:00
background-color: $base-color;
2019-02-04 06:50:31 +01:00
border-spacing: 0;
border: .5px solid $chrome-color;
margin: $tertiary-padding 0px;
2019-01-26 01:37:07 +01:00
tr {
td,
th,
td:first-of-type,
th:first-of-type,
td:last-of-type,
th:last-of-type {
2019-02-04 06:50:31 +01:00
padding: $thin-padding $tertiary-padding;
text-overflow: ellipsis;
}
td:last-of-type {
text-align: right;
2019-01-26 01:37:07 +01:00
}
2019-02-04 06:50:31 +01:00
th {
background: $chrome-color;
}
}
tr:nth-child(even){
background: $chrome-color;
2019-01-26 01:37:07 +01:00
}
}
// Image
img {
2019-02-04 06:50:31 +01:00
margin-bottom: $tertiary-padding;
margin-top: $tertiary-padding;
padding: $secondary-padding;
object-fit: scale-down;
box-sizing: border-box;
display: block;
margin-left: auto;
margin-right: auto;
max-width: 90vw;
}
iframe {
display: block;
margin-left: auto;
margin-right: auto;
max-width: 90vw;
margin-top: $tertiary-padding 0px;
margin-bottom: $tertiary-padding 0px;
2019-01-26 01:37:07 +01:00
}
// 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 {
2019-02-04 06:50:31 +01:00
margin-bottom: $tertiary-padding;
padding: $tertiary-padding;
2019-01-26 01:37:07 +01:00
background-color: $subtle-border-color;
color: $text-color;
display: block;
font-family: Consolas, 'Lucida Console', 'Source Sans', monospace;
}
a {
color: $primary-color;
display: inline;
2019-01-26 01:37:07 +01:00
}
// Lists
ul,
ol {
2019-02-04 06:50:31 +01:00
margin-bottom: $thin-padding;
2019-01-26 01:37:07 +01:00
> li {
list-style-position: outside;
}
}
ul {
list-style: initial;
}
li {
2019-02-04 06:50:31 +01:00
margin-left: $primary-padding;
2019-01-26 01:37:07 +01:00
p {
display: inline-block;
}
}
}