stacker.news/components/text.module.css

250 lines
3.8 KiB
CSS
Raw Normal View History

2021-04-14 23:56:29 +00:00
.text {
font-size: 94%;
2021-06-27 22:28:30 +00:00
font-family: inherit;
2021-10-29 17:56:31 +00:00
word-break: break-word;
line-height: 140%;
2023-12-04 22:07:10 +00:00
overflow-y: hidden;
position: relative;
max-height: 200vh;
2023-12-04 22:07:10 +00:00
}
.text :global(.footnotes) {
font-size: smaller;
color: #8b949e;
border-top: 1px solid #30363d;
}
/* Hide the section label for visual users. */
.text :global(.sr-only) {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
word-wrap: normal;
border: 0;
}
/* Place `[` and `]` around footnote references. */
.text :global([data-footnote-ref])::before {
content: '[';
}
.text :global([data-footnote-ref])::after {
content: ']';
}
.textUncontained {
max-height: none;
2023-12-04 22:07:10 +00:00
}
.textContained::before {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 50vh;
pointer-events: none;
z-index: 1;
background: linear-gradient(rgba(255, 255, 255, 0), var(--bs-body-bg) 200%);
}
.textShowFull {
position: absolute;
bottom: 0;
left: 0;
border-radius: 0;
z-index: 2;
2021-06-27 22:28:30 +00:00
}
@media screen and (min-width: 767px) {
.text {
line-height: 130%;
}
2023-11-21 20:58:15 +00:00
.text img {
min-width: 30% !important;
}
}
2022-07-17 15:33:55 +00:00
.heading {
position: relative;
margin-left: -22px;
padding-left: 22px;
display: block;
2022-07-17 15:33:55 +00:00
}
.headingLink {
display: none;
position: absolute;
left: 0px;
top: 0px;
height: 100%;
width: 44px;
2022-07-17 15:33:55 +00:00
}
2022-10-04 17:43:18 +00:00
.headingLink.copied {
display: flex;
}
2022-07-17 15:33:55 +00:00
.headingLink svg {
align-self: center;
}
.heading:hover>.headingLink {
display: flex;
}
.text hr {
border-top: 1px solid var(--theme-clickToContextColor);
}
.text .p {
2023-12-04 22:07:10 +00:00
display: block;
2021-06-27 22:28:30 +00:00
margin-bottom: .5rem;
2021-04-14 23:56:29 +00:00
white-space: pre-wrap;
word-break: break-word;
2021-06-27 22:28:30 +00:00
}
.text pre {
margin-bottom: .5rem;
}
.text pre>div {
margin: 0 !important;
}
.text>*:last-child {
margin-bottom: 0 !important;
}
2023-01-06 01:06:31 +00:00
.text blockquote:last-child {
margin-bottom: 0 !important;
2021-06-27 22:28:30 +00:00
}
2023-01-05 19:24:09 +00:00
.text blockquote:has(+ :not(blockquote)) {
margin-bottom: .5rem;
}
2021-06-27 22:28:30 +00:00
.text img {
display: block;
margin-top: .5rem;
2023-01-05 19:24:09 +00:00
margin-bottom: .5rem;
width: auto;
2021-06-27 22:28:30 +00:00
max-width: 100%;
cursor: zoom-in;
max-height: 25vh;
2023-11-21 01:54:22 +00:00
object-fit: contain;
object-position: left top;
2023-11-21 20:58:15 +00:00
min-width: 50%;
}
.text img.topLevel {
margin-top: .75rem;
margin-bottom: .75rem;
max-height: 35vh;
}
img.fullScreen {
cursor: zoom-out !important;
max-height: 100%;
max-width: 100vw;
min-width: 0;
min-height: 0;
align-self: center;
justify-self: center;
}
.fullScreenContainer {
--bs-columns: 1;
--bs-rows: 1;
display: grid;
width: 100%;
height: 100%;
align-content: center;
justify-content: center;
2021-06-27 22:28:30 +00:00
}
.text table {
width: auto;
}
.text blockquote {
2024-01-27 20:12:05 +00:00
border-left: 2px solid var(--theme-quoteBar);
padding-left: .75rem;
2023-01-05 19:24:09 +00:00
margin-bottom: 0;
}
.text li+li {
margin-top: .25rem;
}
.text ul,
.text ol {
margin-top: 0;
margin-bottom: 1rem;
padding-left: 2rem;
}
.text ul:last-child, .text ol:last-child {
2023-01-05 19:24:09 +00:00
margin-bottom: 0;
}
.text li > .p {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
.text ol ol,
.text ul ol {
list-style-type: lower-roman;
}
.text ul ul ol,
.text ul ol ol,
.text ol ul ol,
.text ol ol ol {
list-style-type: lower-alpha;
}
.text h1 {
font-size: 1.6rem;
}
.text h2 {
font-size: 1.45rem;
}
.text h3 {
font-size: 1.3rem;
}
.text h4 {
font-size: 1.15rem;
}
.text h5 {
font-size: 1rem;
}
.text h6 {
font-size: .85rem;
}
2023-10-22 18:28:18 +00:00
.youtubeContainer {
position: relative;
width: 100%;
height: 0;
padding-bottom: 56.25%;
overflow: hidden;
}
.youtubeContainer iframe {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
2021-04-14 23:56:29 +00:00
}