@diplodoc/transform
Version:
A simple transformer of text in YFM (Yandex Flavored Markdown) to HTML
248 lines (247 loc) • 7.96 kB
CSS
/* src/scss/_yfm-only.scss */
.yfm .yfm-note {
max-width: 1296px;
margin: 20px 0;
padding: 20px 20px 20px 64px;
border-radius: 10px;
}
.yfm .yfm-note .yfm-note-title {
font-weight: 700;
}
.yfm .yfm-note > * {
margin: 0 0 10px;
}
.yfm .yfm-note > *:first-child::before {
box-sizing: content-box;
display: block;
width: 24px;
height: 24px;
margin-top: -2px;
margin-left: -44px;
padding-right: 20px;
float: left;
}
.yfm .yfm-note > *:last-child {
margin-bottom: 0;
}
.yfm .yfm-note.yfm-accent-info > :first-child::before {
content: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16"%3E%3Ccircle cx="8" cy="8" r="8" fill="rgb(2,123,243)"/%3E%3Crect width="1" height="5" x="7.5" y="6.5" stroke="%23fff" rx=".5"/%3E%3Ccircle cx="8" cy="4" r="1" fill="%23fff"/%3E%3C/svg%3E');
}
.yfm .yfm-note.yfm-accent-tip > :first-child::before {
content: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16"%3E%3Ccircle cx="8" cy="8" r="8" fill="rgb(86,189,103)"/%3E%3Crect width="1" height="5" x="7.5" y="6.5" stroke="%23fff" rx=".5"/%3E%3Ccircle cx="8" cy="4" r="1" fill="%23fff"/%3E%3C/svg%3E');
}
.yfm .yfm-note.yfm-accent-warning > :first-child::before {
content: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16"%3E%3Ccircle cx="8" cy="8" r="8" fill="rgb(241,149,24)"/%3E%3Crect width="1" height="5" x="7.5" y="6.5" stroke="%23fff" rx=".5"/%3E%3Ccircle cx="8" cy="4" r="1" fill="%23fff"/%3E%3C/svg%3E');
}
.yfm .yfm-note.yfm-accent-alert > :first-child::before {
content: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16"%3E%3Ccircle cx="8" cy="8" r="8" fill="rgb(255,70,69)"/%3E%3Crect width="1" height="5" x="7.5" y="6.5" stroke="%23fff" rx=".5"/%3E%3Ccircle cx="8" cy="4" r="1" fill="%23fff"/%3E%3C/svg%3E');
}
.yfm .yfm-note.yfm-accent-info {
background: var(--yfm-color-note-info-background, var(--yfm-color-note-info-background-private));
}
.yfm .yfm-note.yfm-accent-tip {
background: var(--yfm-color-note-tip-background, var(--yfm-color-note-tip-background-private));
}
.yfm .yfm-note.yfm-accent-alert {
background: var(--yfm-color-note-important-background, var(--yfm-color-note-important-background-private));
}
.yfm .yfm-note.yfm-accent-warning {
background: var(--yfm-color-note-warning-background, var(--yfm-color-note-warning-background-private));
}
.yfm .katex svg {
height: inherit;
max-height: inherit;
}
.yfm table td.cell-align-top-left,
.yfm table td.cell-align-bottom-left {
text-align: start;
}
.yfm table td.cell-align-top-center,
.yfm table td.cell-align-center {
text-align: center;
}
.yfm table td.cell-align-top-right,
.yfm table td.cell-align-bottom-right {
text-align: end;
}
.yfm table td.cell-align-top-left,
.yfm table td.cell-align-top-center,
.yfm table td.cell-align-top-right {
vertical-align: top;
}
.yfm table td.cell-align-center {
vertical-align: middle;
}
.yfm table td.cell-align-bottom-left,
.yfm table td.cell-align-bottom-right {
vertical-align: bottom;
}
.yfm table[sticky-header] {
position: relative;
max-height: 70vh;
}
.yfm table[sticky-header] thead {
position: sticky;
top: 0;
z-index: 2;
}
.yfm table[sticky-header] thead td,
.yfm table[sticky-header] thead th {
position: relative;
z-index: 0;
}
.yfm table[sticky-header] thead td::before,
.yfm table[sticky-header] thead th::before {
content: "";
background: var(--yfm-color-table-background, var(--yfm-color-table-background-private));
position: absolute;
inset: 0;
z-index: -2;
}
.yfm table[sticky-header] thead td::after,
.yfm table[sticky-header] thead th::after {
content: "";
background: var(--yfm-color-table-head-background, var(--yfm-color-table-head-background-private));
position: absolute;
inset: 0;
z-index: -1;
}
.yfm table[sticky-header]:not(:has(thead)) tbody > tr:first-child,
.yfm table[sticky-header]:not(:has(thead)) > tr:first-child {
position: sticky;
top: 0;
z-index: 2;
}
.yfm table[sticky-header]:not(:has(thead)) tbody > tr:first-child td,
.yfm table[sticky-header]:not(:has(thead)) tbody > tr:first-child th,
.yfm table[sticky-header]:not(:has(thead)) > tr:first-child td,
.yfm table[sticky-header]:not(:has(thead)) > tr:first-child th {
position: relative;
z-index: 0;
}
.yfm table[sticky-header]:not(:has(thead)) tbody > tr:first-child td::before,
.yfm table[sticky-header]:not(:has(thead)) tbody > tr:first-child th::before,
.yfm table[sticky-header]:not(:has(thead)) > tr:first-child td::before,
.yfm table[sticky-header]:not(:has(thead)) > tr:first-child th::before {
content: "";
background: var(--yfm-color-table-background, var(--yfm-color-table-background-private));
position: absolute;
inset: 0;
z-index: -2;
}
.yfm table[sticky-header]:not(:has(thead)) tbody > tr:first-child td::after,
.yfm table[sticky-header]:not(:has(thead)) tbody > tr:first-child th::after,
.yfm table[sticky-header]:not(:has(thead)) > tr:first-child td::after,
.yfm table[sticky-header]:not(:has(thead)) > tr:first-child th::after {
content: "";
background: var(--yfm-color-table-head-background, var(--yfm-color-table-head-background-private));
position: absolute;
inset: 0;
z-index: -1;
}
.yfm-term_title {
color: var(--yfm-color-term-title, var(--yfm-color-term-title-private));
cursor: pointer;
border-bottom: 1px dotted;
font-size: inherit;
line-height: inherit;
font-style: normal;
}
.yfm-term_title:hover {
color: var(--yfm-color-term-title-hover, var(--yfm-color-term-title-hover-private));
}
.yfm-term_dfn {
position: absolute;
z-index: 100;
visibility: hidden;
opacity: 0;
padding: 10px;
background-color: var(--yfm-color-term-dfn-background, var(--yfm-color-term-dfn-background-private));
font-size: inherit;
line-height: inherit;
font-style: normal;
border-radius: 4px;
box-shadow: 0 8px 20px var(--yfm-color-term-dfn-shadow, var(--yfm-color-term-dfn-shadow-private));
outline: none;
width: -moz-fit-content;
width: fit-content;
max-width: 450px;
}
@media screen and (max-width: 600px) {
.yfm-term_dfn {
max-width: 80%;
}
}
.yfm-term_dfn::before {
content: "";
position: absolute;
z-index: -1;
inset: 0;
border-radius: inherit;
box-shadow: 0 0 0 1px var(--yfm-color-term-dfn-pseudo-shadow, var(--yfm-color-term-dfn-pseudo-shadow-private));
}
.yfm-term_dfn.open {
visibility: visible;
animation-name: popup;
animation-duration: 0.1s;
animation-timing-function: ease-out;
animation-fill-mode: forwards;
}
@keyframes popup {
0% {
opacity: 0;
transform: translateY(10px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
.inline_code_tooltip {
position: absolute;
z-index: 100;
display: none;
opacity: 0;
padding: 10px;
background-color: var(--yfm-color-term-dfn-background, var(--yfm-color-term-dfn-background-private));
font-size: inherit;
line-height: inherit;
font-style: normal;
border-radius: 4px;
box-shadow: 0 8px 20px var(--yfm-color-term-dfn-shadow, var(--yfm-color-term-dfn-shadow-private));
outline: none;
width: -moz-fit-content;
width: fit-content;
max-width: 450px;
}
@media screen and (max-width: 600px) {
.inline_code_tooltip {
max-width: 80%;
}
}
.inline_code_tooltip::before {
content: "";
position: absolute;
z-index: -1;
inset: 0;
border-radius: inherit;
box-shadow: 0 0 0 1px var(--yfm-color-term-dfn-pseudo-shadow, var(--yfm-color-term-dfn-pseudo-shadow-private));
}
.inline_code_tooltip.open {
display: block;
animation-name: popup;
animation-duration: 0.1s;
animation-timing-function: ease-out;
animation-fill-mode: forwards;
}
@keyframes popup {
0% {
opacity: 0;
transform: translateY(10px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
/*# sourceMappingURL=_yfm-only.css.map */