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.
 
 
 
 
 
 

222 lines
3.3 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 {
color: $blue;
text-decoration: none;
&:visited {
color: $violet;
}
}
// this is probably unnecessary, but I'm running into specificity conflicts
// with the <code> colors being set in the theme - `body code` is overriding
// `a code` and not styling <code> elements inside <a> as links.
body a {
code {
color: $blue;
}
&:visited code {
color: $violet;
}
&:hover code {
text-decoration: underline;
}
}
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;
line-height: 1rem;
}
// 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 0;
}
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;
}
ol {
list-style-position: outside;
margin: 0 0 1rem 2rem;
li {
margin-top: 0.2rem;
max-width: $paragraph-max-width - 2rem;
}
&:last-child {
margin-bottom: 0.2rem;
}
}
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-bottom: $border-width solid;
padding: $unit-3 $unit-2;
}
th {
border-bottom-width: $border-width-lg;
}
ul {
list-style-position: outside;
margin: 0.4rem 0 0.4rem 1rem;
li {
margin-top: 0.2rem;
max-width: $paragraph-max-width - 1rem;
}
}