gotosocial/web/source/css/status.css
tobi 16ddad36b2
[frontend] Redesign / color scheme (#688)
* fix css indentation

* profile styling update

* update status styling to match profile

* empty header fix

* generate random avatars for thread views

* appease the linter gods

* upgrade deps

* turn profile accent into border + $bg background

* upgrade deps

* small accessibility tweaks

* general redesign, clearer css variables

* configure instance.Version for testrig

* footer styling

* add sublte borders to box-shadow for separation

* accessible blues, other tweaks

* background bg_accent

* fix viewport

* change client entry buttons to links

* cw button styling

* status display+username spacing

* small thread view tweaks

* color tweaks for accessible contrasts

* use Noto Sans

* biiit less dark bg

* .info contrast, border

Co-authored-by: f0x <f0x@cthu.lu>
2022-07-04 16:23:59 +02:00

267 lines
No EOL
4.3 KiB
CSS

/*
GoToSocial
Copyright (C) 2021-2022 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/>.
*/
main {
background: transparent;
grid-auto-rows: auto;
}
.thread {
display: flex;
flex-direction: column;
border-radius: $br;
}
.toot {
background: $status_unfocus_bg;
box-shadow: $boxshadow;
border: $boxshadow_border;
position: relative;
margin-bottom: $br;
border-radius: $br;
padding: 1.5rem 0;
a {
position: relative;
z-index: 1;
color: inherit;
text-decoration: none;
}
.contentgrid {
padding: 0 1.5rem;
display: grid;
grid-template-columns: 4rem auto 1fr;
grid-template-rows: 1.5rem auto auto;
column-gap: 0.5rem;
}
.avatar {
grid-row: span 2;
aspect-ratio: 1/1;
img {
height: 100%;
width: 100%;
object-fit: cover;
background: $bg;
border: 0.1rem solid $acc2;
/* box-sizing: border-box; */
border-radius: calc($br / 1.5);
}
}
.displayname {
font-weight: bold;
font-size: 1.2rem;
line-height: 2rem;
margin-top: -0.5rem;
align-self: start;
}
.username {
color: $link_fg;
line-height: 2rem;
margin-top: -0.5rem;
justify-self: start;
align-self: start;
}
input.spoiler:checked ~ .content {
display: none;
}
.spoiler {
label {
padding: 0.2rem 0.3rem;
margin-left: 0.4rem;
position: relative;
z-index: 2;
cursor: pointer;
font-size: 1rem;
}
label:hover {
}
}
.text {
margin: 0;
margin-top: 0.5rem;
grid-column: span 2;
a {
color: $link_fg;
text-decoration: underline;
}
}
.media {
margin-top: 0.6rem;
border-radius: 0.2rem;
grid-column: span 3;
display: grid;
grid-template-columns: 50% 50%;
grid-auto-rows: 10rem;
overflow: hidden;
gap: 0.3rem;
a {
position: relative;
}
.no-image-desc {
display: flex;
position: absolute;
bottom: 0.1rem;
right: 0.4rem;
color: white;
background: $blue;
padding: 0.2rem 0.4rem;
border-radius: 100%;
z-index: 3;
i.fa {
display: block;
line-height: 1.3rem;
}
span {
margin-left: 0.3rem;
display: none;
}
&:hover {
span {
display: block;
}
border-radius: 0.2rem;
}
}
img {
width: 100%;
height: 100%;
object-fit: cover;
}
&.single a {
grid-column: span 2;
}
&.odd a:first-child, &.double a {
grid-row: span 2;
}
}
.info {
display: none;
border-top: 0.15rem solid $status_unfocus_bg;
padding: 0.5rem 1.5rem;
div {
position: relative;
padding-right: 1.3rem;
}
.stats {
display: flex;
}
grid-column: span 3;
margin-top: 0.5rem;
flex-wrap: wrap;
div.stats::after {
display: none;
}
div::after {
$size: 0.25rem;
display: block;
background: $fg_dark;
height: $size;
width: $size;
content: "";
position: absolute;
top: calc((1.5rem - $size) / 2);
right: 0.55rem;
border-radius: 1rem;
}
div:last-child {
&::after {
display: none;
}
margin-right: 0;
}
}
.toot-link {
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
text-indent: 100%;
white-space: nowrap;
position: absolute;
z-index: 0;
}
&:first-child {
/* top left, top right */
border-top-left-radius: $br;
border-top-right-radius: $br;
}
&:last-child {
/* bottom left, bottom right */
border-bottom-left-radius: $br;
border-bottom-right-radius: $br;
margin-bottom: 0;
}
&.expanded {
background: $status_focus_bg;
padding-bottom: 0;
.displayname {
grid-column: span 2;
}
.text {
margin-top: 0;
grid-column: span 3;
grid-row: span 1;
}
.info {
display: flex;
}
.media {
grid-auto-rows: 1fr;
max-height: 120rem;
}
}
}
footer + div { /* something weird from the devstack.. */
display: none;
}