Revert "Minor styling tweaks: piccalil.li's modern CSS Reset swyx.io's 100 Bytes of CSS to look great everywhere"

This reverts commit a339ff93b1.
This commit is contained in:
Thomas Sileo 2022-11-11 15:07:18 +01:00
parent 62c9327500
commit 5c98b8dbfb

View file

@ -1,11 +1,9 @@
$font-stack: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, $font-stack: Helvetica, sans-serif;
Ubuntu, roboto, noto, arial, sans-serif;
$background: #ddd; $background: #ddd;
$light-background: #e6e6e6; $light-background: #e6e6e6;
$text-color: #111; $text-color: #111;
$primary-color: #1d781d; $primary-color: #1d781d;
$secondary-color: #781d78; $secondary-color: #781D78;
$form-background-color: #ccc; $form-background-color: #ccc;
$form-text-color: #333; $form-text-color: #333;
$muted-color: #555; // solarized comment text $muted-color: #555; // solarized comment text
@ -15,46 +13,6 @@ $code-highlight-background: #f0f0f0;
// Load custom theme // Load custom theme
@import "theme.scss"; @import "theme.scss";
/* Box sizing rules */
*,
*::before,
*::after {
box-sizing: border-box;
}
/* Set core root defaults */
html:focus-within {
scroll-behavior: smooth;
}
/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
font: inherit;
}
html {
max-width: 90ch;
padding: 3em 1em;
margin: auto;
line-height: 1.75;
font-size: 1.25em;
}
body {
font-family: $font-stack;
background: $background;
color: $text-color;
display: flex;
min-height: 100vh;
flex-direction: column;
}
a {
text-decoration: none;
}
.primary-color { .primary-color {
color: $primary-color; color: $primary-color;
} }
@ -112,7 +70,7 @@ a {
display: none; display: none;
} }
.sensitive-attachment-state:checked ~ .sensitive-attachment-box div { .sensitive-attachment-state:checked ~ .sensitive-attachment-box div {
display: none; display:none;
} }
.sensitive-attachment-box { .sensitive-attachment-box {
position: relative; position: relative;
@ -126,6 +84,7 @@ a {
} }
} }
blockquote { blockquote {
border-left: 3px solid $secondary-color; border-left: 3px solid $secondary-color;
margin-left: 0; margin-left: 0;
@ -133,11 +92,28 @@ blockquote {
} }
.muted { .muted {
color: $muted-color; color: $muted-color;
} }
.light-background { .light-background {
background: $light-background; background: $light-background;
}
body {
font-family: $font-stack;
font-size: 20px;
line-height: 32px;
background: $background;
color: $text-color;
margin: 0;
padding: 0;
display: flex;
min-height: 100vh;
flex-direction: column;
}
a {
text-decoration: none;
} }
dl { dl {
@ -161,56 +137,53 @@ dl {
} }
.shared-header { .shared-header {
margin-left: 20px; margin-left: 20px;
margin-top: 30px; margin-top: 30px;
margin-bottom: -20px; margin-bottom: -20px;
strong { strong {
color: $primary-color; color: $primary-color;
} }
span { span {
color: $muted-color; color: $muted-color;
} }
} }
div.highlight { div.highlight {
background: $code-highlight-background; background: $code-highlight-background;
padding: 0 10px; padding: 0 10px;
overflow: auto; overflow: auto;
display: block; display: block;
margin: 20px 0; margin: 20px 0;
} }
.box { .box {
padding: 0 20px; padding: 0 20px;
} }
code, code, pre {
pre {
color: $secondary-color; // #cb4b16; // #268bd2; // #2aa198; color: $secondary-color; // #cb4b16; // #268bd2; // #2aa198;
font-family: monospace; font-family: monospace;
} }
.form { .form {
input, input, select, textarea {
select, font-size: 20px;
textarea { border: 0;
font-size: 20px; padding: 5px;
border: 0; background: $form-background-color;
padding: 5px; color: $form-text-color;
background: $form-background-color; &:focus {
color: $form-text-color; outline: 1px solid $secondary-color;
&:focus { }
outline: 1px solid $secondary-color; }
input[type=submit] {
font-size: 20px;
outline: none;
background: $primary-color;
color: $primary-button-text-color;
padding: 5px 12px;
cursor: pointer;
} }
}
input[type="submit"] {
font-size: 20px;
outline: none;
background: $primary-color;
color: $primary-button-text-color;
padding: 5px 12px;
cursor: pointer;
}
} }
header { header {
@ -239,17 +212,18 @@ a {
} }
} }
#main { #main {
display: flex; display: flex;
flex: 1; flex: 1;
} }
main { main {
width: 100%; width: 100%;
margin: 30px auto; max-width: 1000px;
margin: 30px auto;
} }
.main-flex { .main-flex {
display: flex; display: flex;
flex: 1; flex: 1;
} }
.centered { .centered {
@ -263,12 +237,12 @@ main {
} }
footer { footer {
font-size: 1em;
width: 100%; width: 100%;
max-width: 1000px;
margin: 20px auto; margin: 20px auto;
color: $muted-color; color: $muted-color;
p { p {
margin: 0; margin: 0;
} }
} }
.tiny-actor-icon { .tiny-actor-icon {
@ -280,7 +254,7 @@ footer {
.actor-box { .actor-box {
display: flex; display: flex;
column-gap: 20px; column-gap: 20px;
margin: 10px 0; margin:10px 0;
.icon-box { .icon-box {
flex: 0 0 50px; flex: 0 0 50px;
} }
@ -294,54 +268,50 @@ footer {
} }
} }
#articles { #articles {
list-style-type: none; list-style-type: none;
margin: 30px 0; margin: 30px 0;
padding: 0 20px; padding: 0 20px;
li { li {
display: block; display: block;
span { span {
padding-right: 10px; padding-right:10px;
}
} }
}
} }
#notifications, #notifications, #followers, #following {
#followers, ul {
#following { list-style-type: none;
ul { margin: 0;
list-style-type: none; padding: 0;
margin: 0; }
padding: 0; li {
} display: block;
li { }
display: block;
}
} }
@mixin admin-button() { @mixin admin-button() {
font-size: 20px; font-size: 20px;
line-height: 32px; line-height: 32px;
font-family: $font-stack; font-family: $font-stack;
background: $form-background-color; background: $form-background-color;
color: $form-text-color; color: $form-text-color;
border: 1px solid $background; border: 1px solid $background;
padding: 8px 10px 5px 10px; padding: 8px 10px 5px 10px;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
border: 1px solid $form-text-color; border: 1px solid $form-text-color;
} }
} }
.show-sensitive-btn, .show-sensitive-btn, .show-more-btn, .label-btn {
.show-more-btn, @include admin-button;
.label-btn { padding: 10px 5px;
@include admin-button; margin: 20px 0;
padding: 10px 5px;
margin: 20px 0;
} }
.show-hide-sensitive-btn { .show-hide-sensitive-btn {
display: inline-block; display:inline-block;
} }
.no-margin-top { .no-margin-top {
@ -365,13 +335,13 @@ ul.poll-items {
} }
.poll-bar { .poll-bar {
width: 100%; width:100%;height:20px;
height: 20px; line {
line { stroke: $secondary-color;
stroke: $secondary-color; stroke-width: 20px;
stroke-width: 20px; }
}
} }
} }
} }
@ -392,45 +362,44 @@ ul.poll-items {
} }
nav { nav {
form { form {
margin: 15px 0; margin: 15px 0;
} }
input[type="submit"], input[type=submit], button {
button { @include admin-button;
@include admin-button; }
}
} }
nav.flexbox { nav.flexbox {
ul { ul {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
list-style-type: none; list-style-type: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
}
ul li { }
margin-right: 20px;
&:last-child { ul li {
margin-right: 0px; margin-right: 20px;
&:last-child {
margin-right: 0px;
}
} }
} a:not(.label-btn) {
a:not(.label-btn) { color: $primary-color;
color: $primary-color; text-decoration: none;
text-decoration: none; &:hover, &:active {
&:hover, color: $secondary-color;
&:active { text-decoration: underline;
color: $secondary-color; }
text-decoration: underline; }
a.active:not(.label-btn) {
color: $secondary-color;
font-weight: bold;
} }
}
a.active:not(.label-btn) {
color: $secondary-color;
font-weight: bold;
}
} }
// after nav.flexbox to override default behavior // after nav.flexbox to override default behavior
@ -443,34 +412,31 @@ a.label-btn {
} }
.ap-object { .ap-object {
margin: 15px 0; margin: 15px 0;
padding: 20px; padding: 20px;
nav { nav {
color: $muted-color; color: $muted-color;
}
.in-reply-to {
display: inline;
color: $muted-color;
}
.e-content,
.activity-og-meta {
a:hover {
text-decoration: underline;
} }
} .in-reply-to {
.activity-attachment { display: inline;
margin: 30px 0 20px 0; color: $muted-color;
img, }
audio, .e-content, .activity-og-meta {
video { a:hover {
width: 100%; text-decoration: underline;
max-width: 740px; }
}
.activity-attachment {
margin: 30px 0 20px 0;
img, audio, video {
width: 100%;
max-width: 740px;
}
}
img.inline-img {
display: block;
max-width: 740px;
} }
}
img.inline-img {
display: block;
max-width: 740px;
}
} }
.activity-og-meta { .activity-og-meta {
@ -487,26 +453,25 @@ a.label-btn {
} }
.ap-object-expanded { .ap-object-expanded {
border: 2px dashed $secondary-color; border: 2px dashed $secondary-color;
} }
.error-box { .error-box {
color: $secondary-color; color: $secondary-color;
} }
.actor-action { .actor-action {
margin-top: 20px; margin-top:20px;
margin-bottom: -20px; margin-bottom:-20px;
padding: 0 20px; padding: 0 20px;
span { span {
color: $muted-color; color: $muted-color;
} }
} }
.actor-metadata { .actor-metadata {
color: $muted-color; color: $muted-color;
} }
.emoji, .emoji, .custom-emoji {
.custom-emoji {
max-width: 25px; max-width: 25px;
} }