cc/css/main.scss
sairaj mote 9c6b4ebebe UX fix
fix issue where on mobile submit button being blocked by refresh button
2021-03-25 02:39:22 +05:30

1015 lines
19 KiB
SCSS

@import url("https://fonts.googleapis.com/css2?family=Barlow:wght@500;600;700&family=Roboto:wght@400;500;700&display=swap");
html {
scroll-behavior: smooth;
}
body {
--accent-color: #00fa9a;
--light-shade: #222;
--background-color: #111;
--foreground-color: 32,32,32;
--text-color: 238, 238, 238;
font-size: clamp(1rem, 1.2vmax, 3rem);
background: var(--background-color);
}
* {
padding: 0;
margin: 0;
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-family: 'Roboto', sans-serif;
}
h1,
h2,
h3,
h4,
h5 {
font-family: 'Barlow', sans-serif;
}
p {
line-height: 1.6;
}
::-webkit-scrollbar {
width: 0.5rem;
height: 0.3rem;
}
::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.1);
}
::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.2);
}
::-webkit-scrollbar-thumb:hover {
background: #555;
}
.hide-completely {
display: none !important;
}
button {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
background: transparent;
color: var(--accent-color);
padding: 0.6rem 1rem;
border: none;
-webkit-transition: background 0.3s ease;
transition: background 0.3s ease;
font-family: 'Barlow', sans-serif;
letter-spacing: 0.06em;
word-spacing: 0.1em;
font-weight: 500;
border-radius: 0.2rem;
text-transform: uppercase;
}
button .icon {
margin-right: 0.6rem;
}
button:hover {
background: var(--light-shade);
cursor: pointer;
}
button:first-of-type {
margin-left: auto;
}
button:focus {
outline: none;
}
button[disabled] {
opacity: 0.5 !important;
cursor: default;
color: rgba(var(--text-color), 1);
}
textarea {
background: var(--light-shade);
color: rgba(var(--text-color), 1);
padding: 1.5rem;
max-width: 100%;
font-size: 1rem;
}
input:not([type="checkbox"]) {
-ms-flex-item-align: start;
align-self: flex-start;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
width: 100%;
padding: 0.8rem;
border: none;
border-radius: 0.2rem;
margin: 1rem 0;
background: #181818;
color: rgba(var(--text-color), 1);
font-size: 1rem !important;
}
input:not([type="checkbox"]):last-of-type {
margin-bottom: 0;
}
label {
display: -ms-grid;
display: grid;
-ms-grid-columns: auto 1fr;
grid-template-columns: auto 1fr;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.flex{
display: flex;
}
#confirmation {
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
padding: 1rem;
}
#confirmation p {
margin: 1rem;
font-size: 1rem;
font-weight: 500;
color: rgba(var(--text-color), 1);
}
#confirmation div {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
#confirmation div button:first-of-type {
margin-left: auto;
}
.icon {
height: 1rem;
width: 1rem;
fill: none;
stroke: var(--accent-color);
stroke-width: 6;
overflow: visible;
stroke-linecap: round;
stroke-linejoin: round;
}
.default-article-checkbox {
display: -ms-grid;
display: grid;
gap: 1rem;
-ms-grid-columns: auto 1fr;
grid-template-columns: auto 1fr;
padding: 0.5rem 0;
margin: 1rem 0;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.default-article-checkbox input {
margin: 0;
}
.dropdown {
position: relative;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #222;
width: -webkit-max-content;
width: -moz-max-content;
width: max-content;
text-align: right;
-webkit-box-shadow: 0.2rem 0.4rem 0.6rem rgba(0, 0, 0, 0.24);
box-shadow: 0.2rem 0.4rem 0.6rem rgba(0, 0, 0, 0.24);
z-index: 2;
right: 0;
}
.dropdown-content button {
width: 100%;
padding: 1rem 1.5rem;
}
.dropdown:hover .dropdown-content {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
.spacer {
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
}
.popup-container {
display: -ms-grid;
display: grid;
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
place-items: center;
background: rgba(0, 0, 0, 0.7);
z-index: 10;
-webkit-transition: opacity 0.3s ease;
transition: opacity 0.3s ease;
}
.popup-container .popup {
width: 26rem;
-ms-flex-item-align: center;
align-self: center;
border-radius: 0.4rem;
height: auto;
padding: 1.5rem;
position: relative;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
background: #222;
-webkit-transform: translateY(1rem);
transform: translateY(1rem);
-webkit-transition: -webkit-transform 0.3s;
transition: -webkit-transform 0.3s;
transition: transform 0.3s;
transition: transform 0.3s, -webkit-transform 0.3s;
-webkit-box-shadow: 0 2rem 2rem rgba(0, 0, 0, 0.24);
box-shadow: 0 2rem 2rem rgba(0, 0, 0, 0.24);
color: rgba(var(--text-color), 1);
overflow-y: auto;
max-height: 100vh;
}
.solid-background {
background: var(--background-color);
}
#context_menu {
display: none;
}
.section-title {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
width: 100%;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
margin-bottom: 1rem;
}
.section-title h2 {
color: var(--background-color);
background: var(--accent-color);
padding: 0.5rem;
margin: 0;
}
#articles_list__button{
width: 3rem;
height: 3rem;
padding: 0.4rem;
margin-left: -0.8rem;
margin-right: 0.5rem;
fill: white;
cursor: pointer;
}
.gallery-name {
padding: 0.2rem 0;
margin: 1rem 0;
font-size: 1.2rem;
color: rgba(var(--text-color), 1);
font-weight: 500;
line-height: 1.5;
}
.edit-article {
margin-left: auto;
}
.edit-article svg {
margin-right: 1rem;
}
#edit_article label {
font-size: 0.9rem;
}
#edit_article input:not([type="checkbox"]) {
margin-bottom: 2rem;
margin-top: 0.5rem;
width: 100%;
}
#edit_article #edit_section_container {
max-height: 50vh;
overflow-y: auto;
}
.heading {
width: 100%;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
padding: 0.5rem 0;
margin-bottom: 0.5rem;
}
.heading h3 {
font-weight: 500;
}
.heading button {
margin-left: auto;
margin-right: 0;
-ms-flex-item-align: center;
-ms-grid-row-align: center;
align-self: center;
}
.heading>.icon:first-of-type {
margin-right: 1rem;
cursor: pointer;
stroke: rgba(var(--text-color), 1);
}
.gallery-container {
position: relative;
}
.gallery-container .navigation-arrows {
-webkit-transition: opacity 0.2s ease;
transition: opacity 0.2s ease;
cursor: pointer;
padding: 1.5rem;
height: 100%;
width: 4rem;
z-index: 2;
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
fill: white;
}
.gallery-container .navigation-arrows:nth-of-type(1) {
background: -webkit-gradient(linear, right top, left top, from(transparent), to(rgba(0, 0, 0, 0.6)));
background: linear-gradient(to left, transparent, rgba(0, 0, 0, 0.6));
}
.gallery-container .navigation-arrows:nth-of-type(2) {
right: 0;
background: -webkit-gradient(linear, left top, right top, from(transparent), to(rgba(0, 0, 0, 0.6)));
background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.6));
}
.gallery {
position: relative;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
overflow-x: auto;
-ms-scroll-snap-type: x mandatory;
scroll-snap-type: x mandatory;
margin-bottom: 4rem !important;
}
.article-body {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
scroll-snap-align: start;
min-width: 30%;
background-color: #222;
color: rgba(var(--text-color), 1);
margin: 0 1rem 1rem 0;
border-radius: 0.2rem;
}
.article-body .article-header {
padding: 1.5rem;
word-break: break-all;
}
.article-body .article-header h5 {
font-weight: normal;
color: #82DDF0;
}
.article-body .card-body {
position: relative;
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
}
.article-body .card-body .content-div {
padding: 0 1.5rem 4rem 1.5rem;
min-height: 16rem;
line-height: 1.7;
max-height: 50vh;
overflow-y: auto;
font-weight: 400;
overflow-wrap: break-word;
}
.article-body .card-body .content-div * {
font-family: 'Roboto', sans-serif;
overflow-wrap: break-word;
}
.article-body .card-body button {
position: absolute;
bottom: 0;
right: 0;
margin-right: 1rem;
}
.article-body .card-body .submit-btn {
background: var(--light-shade);
}
.article-body .card-footer {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
padding: 1rem 1.5rem;
}
.article-body .card-footer h5 {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
font-weight: normal;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
color: var(--accent-color);
cursor: pointer;
}
.article-body .card-footer h5:nth-of-type(2) {
margin-left: auto;
}
.article-body .card-footer h5:nth-of-type(2):hover svg {
fill: var(--accent-color);
}
.article-body .card-footer h5 svg {
stroke: var(--accent-color);
width: 1.2rem;
margin-right: 0.5rem;
}
.show {
opacity: 1;
pointer-events: all;
}
.hide {
opacity: 0;
pointer-events: none;
}
#article_container {
padding: 2rem;
position: absolute;
width: 100%;
height: calc(100% - 4.4rem);
bottom: 0;
overflow-y: auto;
}
.snippet-selected {
outline: 1px solid var(--accent-color);
}
.no-transformations {
-webkit-transform: none !important;
transform: none !important;
}
:-webkit-any-link {
color: var(--accent-color);
text-decoration: none;
}
:-moz-any-link {
color: var(--accent-color);
text-decoration: none;
}
:any-link {
color: var(--accent-color);
text-decoration: none;
}
#sign_in {
border-radius: 0;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-flow: column wrap;
flex-flow: column wrap;
padding: 2rem;
overflow: hidden;
margin: 1rem;
-ms-flex-item-align: center;
-ms-grid-row-align: center;
align-self: center;
width: calc(100% - 2rem);
}
#sign_in .icon {
stroke: rgba(var(--text-color), 1);
}
#sign_in h2 {
margin-bottom: 1rem;
z-index: 3;
}
#sign_in p:first-of-type {
margin-bottom: 4rem;
z-index: 3;
color: rgba(var(--text-color), 0.8);
}
#sign_in .back-btn {
margin-bottom: 1rem;
padding-left: 0;
color: rgba(var(--text-color), 1);
}
#sign_in div:first-of-type {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
margin-bottom: 4rem;
z-index: 3;
}
#sign_in div:first-of-type .icon {
height: 3rem;
width: 3rem;
stroke-width: 4;
margin-bottom: 1rem;
margin-right: 0;
}
#sign_in div:first-of-type button {
margin: initial;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
text-align: center;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
margin: 0.5rem;
width: 8rem;
color: rgba(var(--text-color), 1);
background: rgba(var(--foreground), 1);
}
#sign_in div:first-of-type button:hover {
color: var(--accent-color);
}
#sign_in div:first-of-type button:hover .icon {
stroke: var(--accent-color);
}
#sign_in #priv_key_sign_in {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-flow: column wrap;
flex-flow: column wrap;
z-index: 3;
}
#sign_in #priv_key_sign_in .input {
display: -webkit-box !important;
display: -ms-flexbox !important;
display: flex !important;
background: rgba(0, 0, 0, 0.24);
}
#sign_in #priv_key_sign_in .input input {
width: 100%;
border: none;
outline: none;
margin: 0;
}
#sign_in #priv_key_sign_in button {
margin: 1rem 0 2rem 0;
width: 100%;
background: rgba(var(--text-color), 0.1);
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
#navbar {
position: fixed;
width: 100%;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
color: rgba(var(--text-color), 1);
background: #222;
padding: 1rem;
z-index: 2;
will-change: transform;
}
#navbar h5 {
font-weight: normal;
margin: 0 0 0.25rem 0;
}
#navbar span {
font-size: 0.9rem;
-ms-grid-column-align: center;
justify-self: center;
}
#navbar #icon {
width: 2rem;
margin: 0 0.5rem;
}
#navbar button {
margin-right: 0.5rem;
}
#navbar button:last-of-type {
margin-right: 0;
}
.floating-btn {
display: none;
}
#loader_container {
position: fixed;
height: 100vh;
width: 100vw;
top: 0;
background: var(--background-color);
-webkit-transition: opacity 0.6s ease;
transition: opacity 0.6s ease;
display: -ms-grid;
display: grid;
place-content: center;
z-index: 4;
text-align: center;
}
#loader_container #spinner {
position: relative;
height: 2rem;
fill: teal;
overflow: visible;
-ms-grid-column-align: center;
justify-self: center;
margin-bottom: 2rem;
}
#loader_container h4 {
font-weight: normal;
color: rgba(var(--text-color), 1);
}
#loader_container button {
margin: 1rem auto auto auto;
}
.pulse .first-orb {
-webkit-animation: pulse 1s infinite ease;
animation: pulse 1s infinite ease;
}
.pulse .second-orb {
-webkit-animation: pulse 1s 0.1s infinite ease;
animation: pulse 1s 0.1s infinite ease;
}
.pulse .third-orb {
-webkit-animation: pulse 1s 0.2s infinite ease;
animation: pulse 1s 0.2s infinite ease;
}
@-webkit-keyframes pulse {
0% {
-webkit-transform: scale(1);
transform: scale(1);
}
60% {
-webkit-transform: scale(1.5);
transform: scale(1.5);
}
100% {
-webkit-transform: scale(1);
transform: scale(1);
}
}
@keyframes pulse {
0% {
-webkit-transform: scale(1);
transform: scale(1);
}
60% {
-webkit-transform: scale(1.5);
transform: scale(1.5);
}
100% {
-webkit-transform: scale(1);
transform: scale(1);
}
}
.spin svg {
-webkit-animation: spin 0.6s ease infinite;
animation: spin 0.6s ease infinite;
-webkit-transform-origin: center;
transform-origin: center;
}
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0);
transform: rotate(0);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@keyframes spin {
0% {
-webkit-transform: rotate(0);
transform: rotate(0);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
#section_plot_modal p {
margin: 1rem 0;
font-weight: 400;
}
#section_plot_modal details {
margin-bottom: 1rem;
cursor: pointer;
}
#section_plot_modal summary {
outline: none;
}
#article_list_div {
max-width: 36rem;
height: 80vh;
}
#article_list_div sm-select{
margin-top: 1.5rem;
--max-height: 60vh;
}
@media screen and (min-width: 640px) {
#sign_in {
width: 24rem;
height: auto;
border-radius: 0.4rem;
}
.gallery-name {
max-width: 40rem;
}
#section_plot_modal {
width: 42rem;
}
#confirmation {
padding: 1rem;
width: 24rem;
}
#confirmation button {
margin-left: 0.5rem;
}
#confirmation button:first-of-type {
margin-left: auto;
}
#confirmation p {
margin: 1rem;
margin-bottom: 2rem;
}
#article_list_div {
width: 36rem;
}
}
@media screen and (min-width: 1920px) {
.article-body {
min-width: 20%;
}
}
.label {
margin-bottom: 0.4rem;
font-weight: 500;
}
@media only screen and (max-width: 640px) {
::-webkit-scrollbar {
width: 0.2rem;
height: 0.2rem;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.3);
}
.hide-on-mobile {
display: none;
}
.article-body {
min-width: calc(100% - 2em) !important;
}
#context_menu,
.floating-btn {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
margin: 2rem;
background: #222;
position: fixed;
-webkit-box-shadow: 0.2rem 0.4rem 0.6rem rgba(0, 0, 0, 0.24), -0.1rem -0.2rem 0.4rem rgba(0, 0, 0, 0.16);
box-shadow: 0.2rem 0.4rem 0.6rem rgba(0, 0, 0, 0.24), -0.1rem -0.2rem 0.4rem rgba(0, 0, 0, 0.16);
z-index: 3;
}
#context_menu button,
.floating-btn button {
width: 100%;
}
.floating-btn {
background: #282828;
bottom: 0;
right: 0;
border-radius: 5rem;
overflow: hidden;
}
.floating-btn button {
padding: 1rem;
}
.floating-btn button .icon {
margin-right: 0;
}
#context_menu {
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
#article_container {
padding: 1.5rem 1.5rem 6rem 1.5rem;
}
.navigation-arrows {
opacity: 0;
pointer-events: none;
}
.popup-container .popup {
-ms-flex-item-align: end;
align-self: flex-end;
width: 100%;
border-radius: 0.5rem 0.5rem 0 0;
}
}
@media only screen and (max-width: 1280px) {
.article-body {
min-width: 50%;
}
.hide-on-medium {
display: none;
}
}
@media (any-hover: hover) {
.gallery {
overflow-x: hidden;
}
}