mirror of https://gitlab.com/tildes/tildes.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
207 lines
3.0 KiB
207 lines
3.0 KiB
// Copyright (c) 2018 Tildes contributors <code@tildes.net>
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
// Styles for base elements only (no classes, IDs, etc.)
|
|
// Includes overrides for Spectre.css base element styles as well
|
|
|
|
html {
|
|
font-size: $html-font-size;
|
|
}
|
|
|
|
a {
|
|
text-decoration: none;
|
|
}
|
|
|
|
blockquote {
|
|
margin-left: 1rem;
|
|
max-width: $paragraph-max-width - 1rem; // subtract the left margin
|
|
margin-right: 0;
|
|
|
|
border-left: 1px dotted;
|
|
|
|
// nested blockquotes need reduced margin/padding
|
|
> blockquote {
|
|
margin: 0;
|
|
margin-bottom: 0.2rem;
|
|
padding-top: 0;
|
|
padding-bottom: 0;
|
|
}
|
|
}
|
|
|
|
body {
|
|
position: relative;
|
|
min-height: 100vh;
|
|
|
|
@include font-shrink-on-mobile(0.8rem);
|
|
}
|
|
|
|
code {
|
|
display: inline-block;
|
|
font-size: inherit;
|
|
line-height: 1.1rem;
|
|
-moz-tab-size: 4;
|
|
tab-size: 4;
|
|
}
|
|
|
|
dl dd {
|
|
@extend %text-container;
|
|
|
|
margin-left: 0.4rem;
|
|
font-size: 0.7rem;
|
|
}
|
|
|
|
// Fixes a Chrome bug that seems to treat children of <details> as having
|
|
// box-sizing: content-box. See Known issues: https://caniuse.com/#feat=details
|
|
details * {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
fieldset {
|
|
margin: 1rem;
|
|
margin-right: 0;
|
|
padding-left: 0.4rem;
|
|
border-left: 3px solid;
|
|
}
|
|
|
|
figcaption {
|
|
font-style: italic;
|
|
font-weight: bold;
|
|
font-size: 0.6rem;
|
|
margin-bottom: 0.4rem;
|
|
}
|
|
|
|
figure {
|
|
display: inline-block;
|
|
width: auto;
|
|
text-align: center;
|
|
margin: 0.4rem;
|
|
padding: 0.4rem;
|
|
border: 1px solid;
|
|
|
|
@media (min-width: $size-sm) {
|
|
float: right;
|
|
}
|
|
}
|
|
|
|
form {
|
|
max-width: 40rem;
|
|
}
|
|
|
|
h1,
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6 {
|
|
margin-bottom: 0.4rem;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
h3 {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
h4 {
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
h5 {
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
h6 {
|
|
font-size: 0.7rem;
|
|
}
|
|
|
|
hr {
|
|
border-style: solid;
|
|
border-width: 0 0 1px;
|
|
}
|
|
|
|
legend {
|
|
font-size: 0.8rem;
|
|
margin-left: -1.4rem;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
main {
|
|
padding: 0.2rem;
|
|
overflow: hidden;
|
|
max-width: 100vw;
|
|
|
|
@media (min-width: $size-md) {
|
|
padding: 0.4rem;
|
|
}
|
|
|
|
@media (min-width: $show-sidebar-width) {
|
|
max-width: calc(100vw - #{$sidebar-width} - 1.2rem);
|
|
}
|
|
}
|
|
|
|
menu {
|
|
list-style-type: none;
|
|
padding: 0;
|
|
}
|
|
|
|
// We'll use lists for their semantic value sometimes, so we don't want them to
|
|
// have the normal list numbering/etc. by default. We'll specifically add that
|
|
// back in for text-based lists in places where it's needed.
|
|
ol,
|
|
ul {
|
|
list-style: none;
|
|
margin: 0;
|
|
|
|
ol,
|
|
ul {
|
|
list-style: none;
|
|
}
|
|
}
|
|
|
|
p {
|
|
max-width: $paragraph-max-width;
|
|
margin-bottom: 0.4rem;
|
|
}
|
|
|
|
p:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
pre {
|
|
overflow: auto;
|
|
}
|
|
|
|
section {
|
|
margin-top: 1rem;
|
|
padding-top: 1rem;
|
|
border-top: 2px solid;
|
|
}
|
|
|
|
summary {
|
|
cursor: pointer;
|
|
}
|
|
|
|
// table, td, th styles copied from Spectre.css to avoid needing to add .table
|
|
// and .table-striped classes to all tables in user posts
|
|
table {
|
|
border-collapse: collapse;
|
|
border-spacing: 0;
|
|
width: auto;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
td,
|
|
th {
|
|
border: $border-width solid;
|
|
padding: $unit-3 $unit-2;
|
|
}
|
|
|
|
th {
|
|
border-bottom-width: $border-width-lg;
|
|
}
|