Fix glitch-soc SCSS code style and refactor closer to upstream

main
Claire 2 years ago
parent ac8512a73a
commit cc94cc86ae

@ -48,7 +48,7 @@
width: inherit; width: inherit;
max-width: none; max-width: none;
height: 250px; height: 250px;
border-radius: 0px; border-radius: 0;
} }
} }

@ -60,6 +60,7 @@
width: 48px; width: 48px;
height: 48px; height: 48px;
@include avatar-size(48px); @include avatar-size(48px);
padding-top: 2px; padding-top: 2px;
img { img {
@ -68,7 +69,8 @@
display: block; display: block;
margin: 0; margin: 0;
border-radius: 4px; border-radius: 4px;
@include avatar-radius(); @include avatar-radius;
background: darken($ui-base-color, 8%); background: darken($ui-base-color, 8%);
object-fit: cover; object-fit: cover;
} }

@ -1219,7 +1219,7 @@ a.name-tag,
path:first-child { path:first-child {
fill: rgba($highlight-text-color, 0.25) !important; fill: rgba($highlight-text-color, 0.25) !important;
fill-opacity: 100% !important; fill-opacity: 1 !important;
} }
path:last-child { path:last-child {

@ -2,6 +2,7 @@
@if type-of($color) == 'color' { @if type-of($color) == 'color' {
$color: str-slice(ie-hex-str($color), 4); $color: str-slice(ie-hex-str($color), 4);
} }
@return '%23' + unquote($color); @return '%23' + unquote($color);
} }
@ -15,7 +16,7 @@ body {
text-rendering: optimizelegibility; text-rendering: optimizelegibility;
font-feature-settings: 'kern'; font-feature-settings: 'kern';
text-size-adjust: none; text-size-adjust: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-tap-highlight-color: rgba(0, 0, 0, 0%);
-webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent;
&.system-font { &.system-font {
@ -31,8 +32,8 @@ body {
// Helvetica Neue => Older macOS <10.11 // Helvetica Neue => Older macOS <10.11
// $font-sans-serif => web-font (Roboto) fallback and newer Androids (>=4.0) // $font-sans-serif => web-font (Roboto) fallback and newer Androids (>=4.0)
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
'Helvetica Neue', $font-sans-serif, sans-serif; $font-sans-serif, sans-serif;
} }
&.app-body { &.app-body {
@ -131,12 +132,14 @@ body {
vertical-align: middle; vertical-align: middle;
margin: 20px; margin: 20px;
img { &__illustration {
display: block; img {
max-width: 470px; display: block;
width: 100%; max-width: 470px;
height: auto; width: 100%;
margin-top: -120px; height: auto;
margin-top: -120px;
}
} }
h1 { h1 {
@ -159,13 +162,18 @@ button {
.app-holder { .app-holder {
&, &,
& > div { & > div,
& > noscript {
display: flex; display: flex;
width: 100%; width: 100%;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
outline: 0 !important; outline: 0 !important;
} }
& > noscript {
height: 100vh;
}
} }
.layout-single-column .app-holder { .layout-single-column .app-holder {
@ -182,6 +190,72 @@ button {
} }
} }
.app-holder noscript {
flex-direction: column;
font-size: 16px;
font-weight: 400;
line-height: 1.7;
color: lighten($error-red, 4%);
text-align: center;
& > div {
max-width: 500px;
}
p {
margin-bottom: 0.85em;
&:last-child {
margin-bottom: 0;
}
}
a {
color: $highlight-text-color;
&:hover,
&:focus,
&:active {
text-decoration: none;
}
}
&__footer {
color: $dark-text-color;
font-size: 13px;
a {
color: $dark-text-color;
}
}
button {
display: inline;
border: 0;
background: transparent;
color: $dark-text-color;
font: inherit;
padding: 0;
margin: 0;
line-height: inherit;
cursor: pointer;
outline: 0;
transition: color 300ms linear;
text-decoration: underline;
&:hover,
&:focus,
&:active {
text-decoration: none;
}
&.copied {
color: $valid-value-color;
transition: none;
}
}
}
.logo-resources { .logo-resources {
// Not using display: none because of https://bugs.chromium.org/p/chromium/issues/detail?id=258029 // Not using display: none because of https://bugs.chromium.org/p/chromium/issues/detail?id=258029
visibility: hidden; visibility: hidden;

@ -62,11 +62,11 @@
} }
.account__avatar { .account__avatar {
@include avatar-radius(); @include avatar-radius;
display: block; display: block;
position: relative; position: relative;
cursor: pointer; cursor: pointer;
width: 36px; width: 36px;
height: 36px; height: 36px;
background-size: 36px 36px; background-size: 36px 36px;
@ -79,11 +79,13 @@
&-composite { &-composite {
@include avatar-radius; @include avatar-radius;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
& div { & div {
@include avatar-radius; @include avatar-radius;
float: left; float: left;
position: relative; position: relative;
box-sizing: border-box; box-sizing: border-box;
@ -104,24 +106,24 @@
} }
.account__avatar-overlay { .account__avatar-overlay {
position: relative;
@include avatar-size(48px); @include avatar-size(48px);
position: relative; position: relative;
&-base { &-base {
@include avatar-radius(); @include avatar-radius;
@include avatar-size(36px); @include avatar-size(36px);
img { img {
@include avatar-radius; @include avatar-radius;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
&-overlay { &-overlay {
@include avatar-radius(); @include avatar-radius;
@include avatar-size(24px); @include avatar-size(24px);
position: absolute; position: absolute;
@ -131,6 +133,7 @@
img { img {
@include avatar-radius; @include avatar-radius;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
@ -746,8 +749,6 @@
display: block; display: block;
box-sizing: border-box; box-sizing: border-box;
width: calc(100% + 20px); width: calc(100% + 20px);
margin: 0;
margin-top: 5px;
color: $secondary-text-color; color: $secondary-text-color;
background: $ui-base-color; background: $ui-base-color;
padding: 10px; padding: 10px;
@ -774,6 +775,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
&__message { &__message {
color: $darker-text-color; color: $darker-text-color;
padding: 8px 0; padding: 8px 0;
@ -784,6 +786,7 @@
text-align: center; text-align: center;
margin-bottom: 16px; margin-bottom: 16px;
} }
&__action { &__action {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;

@ -428,6 +428,7 @@ $ui-header-height: 55px;
button { button {
@extend .column-header__button; @extend .column-header__button;
background: transparent; background: transparent;
text-align: center; text-align: center;
padding: 10px 5px; padding: 10px 5px;
@ -491,6 +492,7 @@ $ui-header-height: 55px;
// notif cleaning drawer // notif cleaning drawer
&.ncd { &.ncd {
transition: none; transition: none;
&.collapsed { &.collapsed {
max-height: 0; max-height: 0;
opacity: 0.7; opacity: 0.7;
@ -579,8 +581,8 @@ $ui-header-height: 55px;
font-size: inherit; font-size: inherit;
flex: auto; flex: auto;
background-color: $ui-base-color; background-color: $ui-base-color;
transition-property: background-color, box-shadow;
transition: all 0.2s ease; transition: all 0.2s ease;
transition-property: background-color, box-shadow;
&[disabled] { &[disabled] {
cursor: not-allowed; cursor: not-allowed;
@ -771,7 +773,7 @@ $ui-header-height: 55px;
.column-select { .column-select {
&__control { &__control {
@include search-input(); @include search-input;
&::placeholder { &::placeholder {
color: lighten($darker-text-color, 4%); color: lighten($darker-text-color, 4%);
@ -845,7 +847,8 @@ $ui-header-height: 55px;
} }
&__menu { &__menu {
@include search-popout(); @include search-popout;
padding: 0; padding: 0;
background: $ui-secondary-color; background: $ui-secondary-color;
} }

@ -94,7 +94,6 @@
.compose-form__sensitive-button { .compose-form__sensitive-button {
padding: 10px; padding: 10px;
padding-top: 0; padding-top: 0;
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
@ -155,17 +154,14 @@
.reply-indicator__content { .reply-indicator__content {
position: relative; position: relative;
margin: 10px 0;
padding: 0 12px;
font-size: 14px; font-size: 14px;
line-height: 20px; line-height: 20px;
color: $inverted-text-color;
word-wrap: break-word; word-wrap: break-word;
font-weight: 400; font-weight: 400;
overflow: visible;
white-space: pre-wrap;
padding-top: 5px;
overflow: hidden; overflow: hidden;
padding-top: 5px;
color: $inverted-text-color;
white-space: pre-wrap;
p, p,
pre, pre,
@ -355,19 +351,18 @@
} }
.autosuggest-textarea__suggestions { .autosuggest-textarea__suggestions {
display: block;
position: absolute;
box-sizing: border-box; box-sizing: border-box;
display: none;
position: absolute;
top: 100%; top: 100%;
border-radius: 0 0 4px 4px;
padding: 6px;
width: 100%; width: 100%;
color: $inverted-text-color; z-index: 99;
background: $ui-secondary-color;
box-shadow: 4px 4px 6px rgba($base-shadow-color, 0.4); box-shadow: 4px 4px 6px rgba($base-shadow-color, 0.4);
background: $ui-secondary-color;
border-radius: 0 0 4px 4px;
color: $inverted-text-color;
font-size: 14px; font-size: 14px;
z-index: 99; padding: 6px;
display: none;
} }
.autosuggest-textarea__suggestions--visible { .autosuggest-textarea__suggestions--visible {

@ -37,7 +37,6 @@
display: inline-block; display: inline-block;
padding: 6px 0; padding: 6px 0;
line-height: 18px; line-height: 18px;
cursor: default;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;

@ -1,15 +1,17 @@
$doodleBg: #d9e1e8; $doodle-background: #d9e1e8;
.doodle-modal { .doodle-modal {
@extend .boost-modal; @extend .boost-modal;
width: unset; width: unset;
} }
.doodle-modal__container { .doodle-modal__container {
background: $doodleBg; background: $doodle-background;
text-align: center; text-align: center;
line-height: 0; // remove weird gap under canvas line-height: 0; // remove weird gap under canvas
canvas { canvas {
border: 5px solid $doodleBg; border: 5px solid $doodle-background;
} }
} }
@ -24,7 +26,6 @@ $doodleBg: #d9e1e8;
.doodle-toolbar { .doodle-toolbar {
line-height: 1; line-height: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex-grow: 0; flex-grow: 0;
@ -42,6 +43,7 @@ $doodleBg: #d9e1e8;
input[type='text'] { input[type='text'] {
width: 40px; width: 40px;
} }
span.val { span.val {
display: inline-block; display: inline-block;
text-align: left; text-align: left;

@ -98,7 +98,7 @@
} }
.search-popout { .search-popout {
@include search-popout(); @include search-popout;
} }
.navigation-bar { .navigation-bar {

@ -1321,12 +1321,10 @@ button.icon-button.active i.fa-retweet {
right: 0; right: 0;
bottom: -1px; bottom: -1px;
padding-left: 15px; // space for the box shadow to be visible padding-left: 15px; // space for the box shadow to be visible
z-index: 999; z-index: 999;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
cursor: pointer; cursor: pointer;
display: flex; display: flex;
.wrappy { .wrappy {
@ -1554,7 +1552,7 @@ button.icon-button.active i.fa-retweet {
} }
@keyframes heartbeat { @keyframes heartbeat {
from { 0% {
transform: scale(1); transform: scale(1);
transform-origin: center center; transform-origin: center center;
animation-timing-function: ease-out; animation-timing-function: ease-out;
@ -1804,9 +1802,11 @@ noscript {
0% { 0% {
opacity: 1; opacity: 1;
} }
30% { 30% {
opacity: 0.75; opacity: 0.75;
} }
100% { 100% {
opacity: 1; opacity: 1;
} }

@ -94,7 +94,7 @@
.glitch.local-settings__page { .glitch.local-settings__page {
display: block; display: block;
flex: auto; flex: auto;
padding: 15px 20px 15px 20px; padding: 15px 20px;
width: 360px; width: 360px;
overflow-y: auto; overflow-y: auto;
} }

@ -595,7 +595,6 @@
.player-button { .player-button {
display: inline-block; display: inline-block;
outline: 0; outline: 0;
flex: 0 0 auto; flex: 0 0 auto;
background: transparent; background: transparent;
padding: 5px; padding: 5px;

@ -75,7 +75,6 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
display: none;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -99,7 +98,6 @@
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 25px; padding: 25px;
display: none;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -685,7 +683,6 @@
display: block; display: block;
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
margin: 0;
color: $inverted-text-color; color: $inverted-text-color;
background: $simple-background-color; background: $simple-background-color;
padding: 10px; padding: 10px;
@ -820,7 +817,6 @@
font-family: inherit; font-family: inherit;
font-size: 14px; font-size: 14px;
resize: none; resize: none;
border: 0;
outline: 0; outline: 0;
border-radius: 4px; border-radius: 4px;
border: 1px solid $ui-secondary-color; border: 1px solid $ui-secondary-color;
@ -987,7 +983,6 @@
padding-left: 20px; padding-left: 20px;
padding-right: 20px; padding-right: 20px;
padding-bottom: 10px; padding-bottom: 10px;
font-size: 14px; font-size: 14px;
label, label,
@ -1135,7 +1130,7 @@
width: 100%; width: 100%;
border: 0; border: 0;
padding: 10px; padding: 10px;
font-family: 'mastodon-font-monospace', monospace; font-family: mastodon-font-monospace, monospace;
background: $ui-base-color; background: $ui-base-color;
color: $primary-text-color; color: $primary-text-color;
font-size: 14px; font-size: 14px;

@ -4,7 +4,7 @@
} }
.search__input { .search__input {
@include search-input(); @include search-input;
display: block; display: block;
padding: 15px; padding: 15px;
@ -181,7 +181,7 @@
path:first-child { path:first-child {
fill: rgba($highlight-text-color, 0.25) !important; fill: rgba($highlight-text-color, 0.25) !important;
fill-opacity: 100% !important; fill-opacity: 1 !important;
} }
path:last-child { path:last-child {

@ -332,6 +332,7 @@
0% { 0% {
opacity: 0; opacity: 0;
} }
100% { 100% {
opacity: 1; opacity: 1;
} }
@ -417,7 +418,7 @@
text-overflow: ellipsis; text-overflow: ellipsis;
padding-top: 0; padding-top: 0;
&:after { &::after {
content: ''; content: '';
position: absolute; position: absolute;
top: 0; top: 0;
@ -435,13 +436,15 @@
text-decoration: none; text-decoration: none;
} }
} }
&:focus > .status__content:after {
&:focus > .status__content::after {
background: linear-gradient( background: linear-gradient(
rgba(lighten($ui-base-color, 4%), 0), rgba(lighten($ui-base-color, 4%), 0),
rgba(lighten($ui-base-color, 4%), 1) rgba(lighten($ui-base-color, 4%), 1)
); );
} }
&.status-direct > .status__content:after {
&.status-direct > .status__content::after {
background: linear-gradient( background: linear-gradient(
rgba(lighten($ui-base-color, 8%), 0), rgba(lighten($ui-base-color, 8%), 0),
rgba(lighten($ui-base-color, 8%), 1) rgba(lighten($ui-base-color, 8%), 1)
@ -458,7 +461,7 @@
} }
.notification__message { .notification__message {
margin: -10px 0px 10px 0; margin: -10px 0 10px;
} }
} }
@ -1098,7 +1101,6 @@ a.status-card.compact:hover {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
pointer-events: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
border-left: 4px solid $highlight-text-color; border-left: 4px solid $highlight-text-color;

@ -74,6 +74,7 @@
width: 40px; width: 40px;
height: 40px; height: 40px;
@include avatar-size(40px); @include avatar-size(40px);
margin-right: 10px; margin-right: 10px;
img { img {
@ -82,7 +83,7 @@
display: block; display: block;
margin: 0; margin: 0;
border-radius: 4px; border-radius: 4px;
@include avatar-radius(); @include avatar-radius;
} }
} }

@ -37,7 +37,6 @@
text-align: center; text-align: center;
font-weight: 500; font-weight: 500;
font-size: 24px; font-size: 24px;
line-height: 21px;
color: $primary-text-color; color: $primary-text-color;
margin-bottom: 20px; margin-bottom: 20px;
line-height: 30px; line-height: 30px;

@ -759,7 +759,7 @@ html {
} }
} }
.status.collapsed .status__content:after { .status.collapsed .status__content::after {
background: linear-gradient( background: linear-gradient(
rgba(darken($ui-base-color, 13%), 0), rgba(darken($ui-base-color, 13%), 0),
rgba(darken($ui-base-color, 13%), 1) rgba(darken($ui-base-color, 13%), 1)

@ -85,7 +85,6 @@
width: 100%; width: 100%;
font-size: 14px; font-size: 14px;
color: $inverted-text-color; color: $inverted-text-color;
display: block;
outline: 0; outline: 0;
font-family: inherit; font-family: inherit;
background: $simple-background-color; background: $simple-background-color;
@ -116,7 +115,6 @@
box-sizing: border-box; box-sizing: border-box;
width: 18px; width: 18px;
height: 18px; height: 18px;
flex: 0 0 auto;
margin-inline-end: 10px; margin-inline-end: 10px;
top: -1px; top: -1px;
border-radius: 50%; border-radius: 50%;

@ -41,6 +41,7 @@ $highlight-text-color: lighten($ui-highlight-color, 8%) !default;
$action-button-color: $ui-base-lighter-color !default; $action-button-color: $ui-base-lighter-color !default;
$passive-text-color: $gold-star !default; $passive-text-color: $gold-star !default;
$active-passive-text-color: $success-green !default; $active-passive-text-color: $success-green !default;
// For texts on inverted backgrounds // For texts on inverted backgrounds
$inverted-text-color: $ui-base-color !default; $inverted-text-color: $ui-base-color !default;
$lighter-text-color: $ui-base-lighter-color !default; $lighter-text-color: $ui-base-lighter-color !default;
@ -51,6 +52,7 @@ $cjk-langs: ja, ko, zh-CN, zh-HK, zh-TW;
// Variables for components // Variables for components
$media-modal-media-max-width: 100%; $media-modal-media-max-width: 100%;
// put margins on top and bottom of image to avoid the screen covered by image. // put margins on top and bottom of image to avoid the screen covered by image.
$media-modal-media-max-height: 80%; $media-modal-media-max-height: 80%;

Loading…
Cancel
Save