This repository has been archived on 2024-06-02. You can view files and clone it, but cannot push or open issues or pull requests.
gts-web-standalone/assets/dist/base.css

709 lines
11 KiB
CSS

:root {
--br: 0.4rem;
--br-inner: 0.2rem;
--fa-fw: 1.25;
}
/*
GoToSocial
Copyright (C) 2021-2023 GoToSocial Authors admin@gotosocial.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
*,
::before,
::after {
box-sizing: border-box;
}
html {
-o-tab-size: 2;
tab-size: 2;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
}
hr {
height: 0;
color: inherit;
}
abbr[title] {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
}
b,
strong {
font-weight: bolder;
}
code,
kbd,
samp,
pre {
font-family:
ui-monospace,
SFMono-Regular,
Consolas,
'Liberation Mono',
Menlo,
monospace;
font-size: 1em;
}
small {
font-size: 80%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
table {
text-indent: 0;
border-color: inherit;
}
button,
input,
optgroup,
select,
textarea {
font-family: inherit;
font-size: 100%;
line-height: 1.15;
margin: 0;
}
button,
select {
text-transform: none;
}
/**
Correct the inability to style clickable types in iOS and Safari.
*/
button,
[type='button'],
[type='reset'],
[type='submit'] {
-webkit-appearance: button;
}
::-moz-focus-inner {
border-style: none;
padding: 0;
}
:-moz-focusring {
outline: 1px dotted ButtonText;
}
:-moz-ui-invalid {
box-shadow: none;
}
legend {
padding: 0;
}
progress {
vertical-align: baseline;
}
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
height: auto;
}
[type='search'] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit;
}
summary {
display: list-item;
}
html,
body {
background: var(--bg);
color: var(--fg);
font-family:
system-ui,
-apple-system, /* Firefox supports this but not yet `system-ui` */
'Segoe UI',
Roboto,
Helvetica,
Arial,
sans-serif,
'Apple Color Emoji',
'Segoe UI Emoji';
}
body {
padding: 1rem;
margin: 0 auto;
min-height: 100vh;
max-width: 60rem;
gap: 1rem;
line-height: 1.5em;
display: flex;
flex-direction: column;
justify-content: space-evenly;
}
.hidden {
display: none;
}
h1 {
margin: 0;
line-height: 2.4rem;
}
a {
transition: all 0.25s ease-out;
color: var(--link-fg);
}
header {
display: flex;
justify-content: center;
}
header a {
display: flex;
flex-wrap: wrap;
margin: 1.5rem;
gap: 1rem;
justify-content: center;
}
header a img {
align-self: center;
height: 3rem;
}
header a h1 {
flex-grow: 1;
align-self: center;
text-align: center;
font-size: 1.5rem;
word-wrap: anywhere;
color: var(--fg);
}
.excerpt-top {
margin-bottom: 2rem;
font-style: italic;
font-weight: normal;
text-align: center;
font-size: 1.2rem;
}
.excerpt-top .count {
font-weight: bold;
color: var(--fg-accent);
}
main :first-child {
margin-top: 0;
}
main :last-child {
margin-bottom: 0;
}
.button, button {
border-radius: 0.2rem;
color: var(--button-fg);
background: var(--button-bg);
box-shadow: var(--boxshadow);
border: var(--button-border);
text-decoration: none;
font-size: 1.2rem;
font-weight: bold;
padding: 0.5rem;
border: none;
cursor: pointer;
text-align: center;
font-family: 'Noto Sans', sans-serif;
}
.button.danger, button.danger {
color: var(--button-danger-fg);
background: var(--button-danger-bg);
}
.button.danger:hover, button.danger:hover {
background: var(--button-danger-hover-bg);
}
.button:disabled, button:disabled {
color: var(--white2);
background: var(--gray2);
cursor: auto;
}
.button:disabled:hover, button:disabled:hover {
background: var(--gray3);
}
.button:hover, button:hover {
background: var(--button-hover-bg);
}
.nounderline {
text-decoration: none;
}
.accent {
color: var(--acc1);
}
.logo {
justify-self: center;
}
.logo img {
height: 30vh;
}
section.apps {
align-self: start;
}
section.apps .applist {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 0.5rem;
align-content: start;
}
section.apps .applist .entry {
display: grid;
grid-template-columns: 25% 1fr;
gap: 1.5rem;
padding: 0.5rem;
background: var(--bg-accent);
border-radius: 0.5rem;
}
section.apps .applist .entry .logo {
align-self: center;
width: 100%;
-o-object-fit: contain;
object-fit: contain;
flex: 1 1 auto;
}
section.apps .applist .entry .logo.redraw {
fill: var(--fg);
stroke: var(--fg);
}
section.apps .applist .entry a {
font-weight: bold;
}
section.apps .applist .entry div {
padding: 0;
}
section.apps .applist .entry div h3 {
margin-top: 0;
}
section.login form {
display: flex;
flex-direction: column;
gap: 1rem;
padding-bottom: 1rem;
padding-top: 1rem;
}
section.login form label, section.login form input {
padding-left: 0.2rem;
}
section.login form .labelinput {
display: flex;
flex-direction: column;
gap: 0.4rem;
}
section.login form .btn {
margin-top: 1rem;
}
section.error {
word-break: break-word;
margin-bottom: 0.5rem;
}
section.error pre {
border: 1px solid #ff000080;
padding: 0.5rem;
border-radius: 0.5em;
background-color: #ff000010;
font-size: 1.3em;
white-space: pre-wrap;
}
section.oob-token code {
background: var(--gray2);
padding: 0.5rem;
margin: 0;
border-radius: 0.3rem;
}
.error-text {
color: var(--error1);
background: var(--error2);
border-radius: 0.1rem;
font-weight: bold;
}
input, select, textarea, .input {
box-sizing: border-box;
border: 0.15rem solid var(--input-border);
border-radius: 0.1rem;
color: var(--fg);
background: var(--input-bg);
width: 100%;
font-family: 'Noto Sans', sans-serif;
font-size: 1rem;
padding: 0.3rem;
}
input:focus, input:active, select:focus, select:active, textarea:focus, textarea:active, .input:focus, .input:active {
border-color: var(--input-focus-border);
}
input:invalid, .invalid input, select:invalid, .invalid select, textarea:invalid, .invalid textarea, .input:invalid, .invalid .input {
border-color: var(--input-error-border);
}
input:disabled, select:disabled, textarea:disabled, .input:disabled {
background: transparent;
}
::-webkit-input-placeholder {
opacity: 1;
color: var(--fg-reduced)
}
::placeholder {
opacity: 1;
color: var(--fg-reduced)
}
hr {
color: transparent;
width: 100%;
border-bottom: 0.02rem solid var(--border-accent);
}
footer {
display: flex;
flex-wrap: wrap;
justify-content: center;
padding: 3rem 1rem;
gap: 2rem;
}
footer *
{ display: flex }
footer .round
{ border-radius: 999px }
footer .bg-icon
{ background-image : url( '/button-gradient.svg' )
, url('/icon.png') !important
}
footer img
{ max-width : 100vw
; overflow : hidden
}
footer .buttons
{ gap : 1rem
; padding : 1rem
; background : white
; flex-wrap : nowrap
}
footer .buttons img
{ height : 2rem }
footer .buttons > *
{ height : 2rem
; min-width : 2rem
}
footer .buttons > a:any-link
{ background :
var( --b, #ccc )
url( '/button-gradient.svg' )
50% 50% no-repeat
; background-size : cover
; box-shadow
: inset 0 0 0 0.125rem #fff0
, 0 0 0 0.125rem #0000
}
footer .buttons > a:any-link:is( :hover, :focus, :active )
{ box-shadow
: inset 0 0 0 0.125rem #fff
, 0 0 0 0.125rem var( --b, #ccc )
}
footer .buttons .group
{ padding : 0 }
footer .buttons.round > *
{ border-radius : 999px }
@media screen and (max-width: 600px) {
header {
text-align: center;
}
footer {
grid-template-columns: 1fr;
}
footer div {
text-align: initial;
width: 100%;
}
section.apps .applist {
grid-template-columns: 1fr;
}
}
.emoji {
width: 1.45em;
height: 1.45em;
margin: -0.2em 0.02em 0;
-o-object-fit: contain;
object-fit: contain;
vertical-align: middle;
}
.monospace {
font-family: monospace;
}
.callout {
margin: 1.5rem 0;
border: .05rem solid var(--border-accent);
border-radius: .2rem;
padding: 0 .6rem .6rem;
}
.callout .callout-title {
margin: 0 -.6rem;
padding: .6rem;
font-weight: bold;
background-color: var(--border-accent);
color: var(--gray2);
}
label {
cursor: pointer;
}
@media (prefers-reduced-motion) {
.fa-spin {
-webkit-animation: none;
animation: none;
}
}
.text-cutoff {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.list {
display: flex;
flex-direction: column;
}
.list .header, .list .entry {
padding: 0.5rem;
}
.list .header {
border: 0.1rem solid transparent !important; /* for alignment with .entry border padding */
background: var(--gray2) !important;
display: flex;
font-weight: bold;
}
.list .entries {
display: flex;
flex-direction: column;
}
.list .entries.scrolling {
height: 20rem;
max-height: 20rem;
overflow: auto;
}
.list input[type=checkbox] {
margin-left: 0.5rem;
}
.list .entry {
display: flex;
flex-wrap: wrap;
background: var(--list-entry-bg);
border: 0.1rem solid transparent;
}
.list .entry:nth-child(even) {
background: var(--list-entry-alternate-bg);
}
.list .entry:hover {
background: var(--list-entry-hover-bg);
}
.list .entry:active, .list .entry:focus, .list .entry:hover, .list .entry:target {
border-color: var(--fg-accent);
}
.domain-blocklist {
box-shadow: var(--boxshadow);
}
.domain-blocklist .entry {
display: grid;
grid-template-columns: max(30%, 10rem) 1fr;
gap: 0.5rem;
align-items: start;
border: var(--boxshadow-border);
border-top-color: transparent;
}
.domain-blocklist .entry > div {
display: flex;
align-items: center
}
.domain-blocklist .entry .domain a {
font-weight: bold;
text-decoration: none;
display: inline-block; /* so it wraps properly */
}
.domain-blocklist .entry .public_comment p {
margin: 0;
}
.domain-blocklist .header .domain {
color: var(--fg);
}
.about {
display: flex;
flex-direction: column;
gap: 1rem;
}
.about h2 {
margin: 2rem 0 0 0;
}
.about ul,
.about p {
margin: 0;
}
.account-card {
display: inline-grid;
grid-template-columns: auto 1fr;
grid-template-rows: auto auto;
text-decoration: none;
gap: 0.5rem 1rem;
border-radius: var(--br);
padding: 0.5rem;
min-width: 40%;
margin-bottom: 0.3rem;
background: var(--list-entry-bg);
}
.account-card:hover {
background: var(--list-entry-alternate-bg);
}
.account-card h3 {
align-self: end;
margin: 0;
color: var(--fg);
}
.account-card img.avatar {
border-radius: 0.5rem;
width: 5rem;
height: 5rem;
-o-object-fit: cover;
object-fit: cover;
grid-row: 1 / span 2;
}
@media screen and (max-width: 30rem) {
.domain-blocklist .entry {
grid-template-columns: 1fr;
gap: 0;
}
}