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

main
Cassio Zen 2022-11-09 12:15:22 -06:00 committed by Thomas Sileo
parent afd253a1b4
commit a339ff93b1
1 changed files with 200 additions and 165 deletions

View File

@ -1,9 +1,11 @@
$font-stack: Helvetica, sans-serif;
$font-stack: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell,
Ubuntu, roboto, noto, arial, sans-serif;
$background: #ddd;
$light-background: #e6e6e6;
$text-color: #111;
$primary-color: #1d781d;
$secondary-color: #781D78;
$secondary-color: #781d78;
$form-background-color: #ccc;
$form-text-color: #333;
$muted-color: #555; // solarized comment text
@ -13,6 +15,46 @@ $code-highlight-background: #f0f0f0;
// Load custom theme
@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 {
color: $primary-color;
}
@ -70,7 +112,7 @@ $code-highlight-background: #f0f0f0;
display: none;
}
.sensitive-attachment-state:checked ~ .sensitive-attachment-box div {
display:none;
display: none;
}
.sensitive-attachment-box {
position: relative;
@ -84,7 +126,6 @@ $code-highlight-background: #f0f0f0;
}
}
blockquote {
border-left: 3px solid $secondary-color;
margin-left: 0;
@ -99,23 +140,6 @@ blockquote {
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 {
display: flex;
dt {
@ -160,13 +184,16 @@ div.highlight {
padding: 0 20px;
}
code, pre {
code,
pre {
color: $secondary-color; // #cb4b16; // #268bd2; // #2aa198;
font-family: monospace;
}
.form {
input, select, textarea {
input,
select,
textarea {
font-size: 20px;
border: 0;
padding: 5px;
@ -176,7 +203,7 @@ code, pre {
outline: 1px solid $secondary-color;
}
}
input[type=submit] {
input[type="submit"] {
font-size: 20px;
outline: none;
background: $primary-color;
@ -217,7 +244,6 @@ a {
}
main {
width: 100%;
max-width: 1000px;
margin: 30px auto;
}
@ -237,8 +263,8 @@ main {
}
footer {
font-size: 1em;
width: 100%;
max-width: 1000px;
margin: 20px auto;
color: $muted-color;
p {
@ -254,7 +280,7 @@ footer {
.actor-box {
display: flex;
column-gap: 20px;
margin:10px 0;
margin: 10px 0;
.icon-box {
flex: 0 0 50px;
}
@ -274,12 +300,14 @@ footer {
li {
display: block;
span {
padding-right:10px;
padding-right: 10px;
}
}
}
#notifications, #followers, #following {
#notifications,
#followers,
#following {
ul {
list-style-type: none;
margin: 0;
@ -304,14 +332,16 @@ footer {
}
}
.show-sensitive-btn, .show-more-btn, .label-btn {
.show-sensitive-btn,
.show-more-btn,
.label-btn {
@include admin-button;
padding: 10px 5px;
margin: 20px 0;
}
.show-hide-sensitive-btn {
display:inline-block;
display: inline-block;
}
.no-margin-top {
@ -335,13 +365,13 @@ ul.poll-items {
}
.poll-bar {
width:100%;height:20px;
width: 100%;
height: 20px;
line {
stroke: $secondary-color;
stroke-width: 20px;
}
}
}
}
@ -365,7 +395,8 @@ nav {
form {
margin: 15px 0;
}
input[type=submit], button {
input[type="submit"],
button {
@include admin-button;
}
}
@ -378,7 +409,6 @@ nav.flexbox {
list-style-type: none;
margin: 0;
padding: 0;
}
ul li {
@ -391,7 +421,8 @@ nav.flexbox {
a:not(.label-btn) {
color: $primary-color;
text-decoration: none;
&:hover, &:active {
&:hover,
&:active {
color: $secondary-color;
text-decoration: underline;
}
@ -421,14 +452,17 @@ a.label-btn {
display: inline;
color: $muted-color;
}
.e-content, .activity-og-meta {
.e-content,
.activity-og-meta {
a:hover {
text-decoration: underline;
}
}
.activity-attachment {
margin: 30px 0 20px 0;
img, audio, video {
img,
audio,
video {
width: 100%;
max-width: 740px;
}
@ -461,8 +495,8 @@ a.label-btn {
}
.actor-action {
margin-top:20px;
margin-bottom:-20px;
margin-top: 20px;
margin-bottom: -20px;
padding: 0 20px;
span {
color: $muted-color;
@ -471,7 +505,8 @@ a.label-btn {
.actor-metadata {
color: $muted-color;
}
.emoji, .custom-emoji {
.emoji,
.custom-emoji {
max-width: 25px;
}