lbry.tech/app/sass/init/_markdown.scss

302 lines
4.5 KiB
SCSS
Raw Normal View History

%markdown {
h1 {
margin-bottom: 0.25rem;
@media (min-width: 901px) {
font-size: 3rem;
}
@media (max-width: 900px) {
font-size: 2rem;
}
+ h2 {
margin-top: 2rem;
}
}
h2 {
@media (min-width: 901px) {
font-size: 2rem;
}
@media (max-width: 900px) {
font-size: 1.5rem;
}
+ h3 {
margin-top: 1rem;
}
}
h3 {
@media (min-width: 901px) {
font-size: 1.5rem;
}
@media (max-width: 900px) {
font-size: 1.25rem;
}
}
h4 {
letter-spacing: 0.05rem;
text-transform: uppercase;
@media (min-width: 901px) {
font-size: 1.25rem;
}
@media (max-width: 900px) {
font-size: 1.15rem;
}
}
h5 {
font-size: 1rem;
}
sup {
@include font-mono;
}
blockquote {
left: 2px;
line-height: 1.5;
margin-bottom: 0.5rem;
position: relative;
@media (min-width: 601px) {
2018-10-06 00:46:08 +02:00
width: 70%;
padding: 0.5rem 0 0.05rem 2rem;
font-size: 1.5rem;
2018-10-06 00:46:08 +02:00
margin-left: 15%;
}
@media (max-width: 600px) {
2018-10-06 00:46:08 +02:00
padding: 0.5rem 0 0.05rem;
font-size: 1.25rem;
}
@media (min-width: 376px) and (max-width: 600px) {
width: 90%;
2018-10-06 00:46:08 +02:00
margin-left: 5%;
}
p {
font-size: inherit;
line-height: inherit;
}
&::before {
@include font-serif;
width: 150px; height: 100px;
top: 3rem; left: -2rem;
2018-10-13 00:29:53 +02:00
color: rgba($lbry-teal-3, 0.2);
content: "\201C";
font-size: 20rem;
line-height: 0.5;
position: absolute;
}
}
p,
ol,
ul,
table {
code {
2018-10-06 00:46:08 +02:00
padding: 0.3rem 0.5rem;
2018-10-13 00:29:53 +02:00
background-color: $lbry-black;
border-radius: 3px;
2018-10-13 00:29:53 +02:00
color: $lbry-white;
font-size: 60%;
letter-spacing: 0.05rem;
vertical-align: middle;
@media (max-width: 900px) {
top: -1px;
2018-10-06 00:46:08 +02:00
position: relative;
}
}
2018-10-06 00:46:08 +02:00
2018-10-01 01:43:35 +02:00
+ h2 {
margin-top: 2rem;
}
2018-10-06 00:46:08 +02:00
+ h3,
+ h4,
+ h5 {
2018-10-01 01:43:35 +02:00
margin-top: 1.5rem;
}
}
p,
ol,
2018-10-09 20:41:03 +02:00
ul:not(.component--glossary-toc) {
margin-bottom: 1rem;
position: relative;
@media (min-width: 901px) {
font-size: 1.25rem;
line-height: 1.6;
}
@media (max-width: 900px) {
font-size: 1.05rem;
line-height: 1.55;
}
}
ol,
ul {
padding-top: 0.5rem;
2018-10-06 00:46:08 +02:00
li:not(:last-of-type) {
margin-bottom: 0.25rem;
}
}
ol {
padding-left: 0.1rem;
li {
list-style-type: lower-roman;
}
}
ul {
padding-left: 0.25rem;
li {
list-style-type: disc;
}
}
img {
display: block;
margin-right: auto;
margin-bottom: 1rem;
2018-10-06 00:46:08 +02:00
margin-left: auto;
}
p {
2018-10-01 01:43:35 +02:00
margin-right: 2px;
2018-10-06 00:46:08 +02:00
margin-left: 2px;
img {
float: right;
}
}
a:not(.__button-black):not(.button) {
2018-10-13 00:29:53 +02:00
@include underline($lbry-teal-3, $lbry-white);
color: $lbry-teal-3;
code {
2018-10-13 00:29:53 +02:00
background-color: $lbry-teal-3;
text-shadow: none;
}
}
pre {
font-size: 1rem;
}
2018-10-06 00:46:08 +02:00
h2,
h3,
h4,
h5 {
+ table {
margin-top: 0.5em;
}
}
table {
2018-10-06 00:46:08 +02:00
width: 100%;
2018-10-13 00:29:53 +02:00
background-color: $lbry-white;
border: 1px solid $lbry-gray-1;
border-spacing: 0;
margin-bottom: 2rem;
position: relative;
@media (max-width: 1030px) {
display: inline-grid;
thead {
display: none;
}
2018-10-06 00:46:08 +02:00
tbody,
tr,
td {
display: block;
}
tbody tr:last-of-type td:not(:last-of-type) {
2018-10-13 00:29:53 +02:00
border-bottom: 1px solid $lbry-gray-1;
}
}
thead {
2018-10-13 00:29:53 +02:00
background-color: $lbry-black;
color: $lbry-white;
cursor: default;
position: relative;
tr {
position: relative;
z-index: 1;
}
2018-10-06 00:46:08 +02:00
&:not(*:root)::after {
z-index: -1;
}
&::after {
width: calc(100% + 2px); height: calc(100% + 2px);
top: -1px; left: -1px;
2018-10-13 00:29:53 +02:00
background-color: $lbry-black;
content: "";
position: absolute;
z-index: 0;
}
}
tbody {
line-height: 1.55;
}
tr:nth-of-type(even) {
2018-10-13 00:29:53 +02:00
background-color: $lbry-gray-1;
2018-10-16 18:02:23 +02:00
a:not(.__button-black):not(.button) { // "dirty" override but necessary
@include underline($lbry-teal-3, $lbry-gray-1);
}
}
2018-10-06 00:46:08 +02:00
th,
td {
padding: 0.5rem 1rem;
}
th {
font-size: 0.8rem;
letter-spacing: 0.1rem;
text-transform: uppercase;
}
tbody tr:not(:last-of-type) td {
2018-10-13 00:29:53 +02:00
border-bottom: 1px solid $lbry-gray-1;
}
td {
font-size: 1rem;
}
}
}