Files
AstralRinth/assets/styles/components.scss
Geometrically 740357d120 Migrate to Nuxt 3 (#933)
* Migrate to Nuxt 3

* Update vercel config

* remove tsconfig comment

* Changelog experiment + working proj pages

* Fix package json

* Prevent vercel complaining

* fix deploy (hopefully)

* Tag generator

* Switch to yarn

* Vercel pls 🙏

* Fix tag generation bug

* Make (most) non-logged in pages work

* fix base build

* Linting + state

* Eradicate axios, make most user pages work

* Fix checkbox state being set incorrectly

* Make most things work

* Final stretch

* Finish (most) things

* Move to update model value

* Fix modal text getting blurred from transforms (#964)

* Adjust nav-link border radius when focused (#961)

* Transition between animation states on TextLogo (#955)

* Transition between animation states on TextLogo

* Remove unused refs

* Fixes from review

* Disable tabbing to pagination arrows when disabled (#972)

* Make position of the "no results" text on grid/gallery views consistent (fixes #963) (#965)

* Fix position of the "no results" text on grid view

* fix padding

* Remove extra margin on main page, fixes #957 (#959)

* Fix layout shift and placeholder line height (#973)

* Fix a lot of issues

* Fix more nuxt 3 issues

* fix not all versions showing up (temp)

* inline inter css file

* More nuxt 3 fixes

* [skip ci] broken- backup changes

* Change modpack warnings to blue instead of red (#991)

* Fix some hydration issues

* Update nuxt

* Fix some images not showing

* Add pagination to versions page + fix lag

* Make changelog page consistent with versions page

* sync before merge

* Delete old file

* Fix actions failing

* update branch

* Fixes navbar transition animation. (#1012)

* Fixes navbar transition animation.

* Fixes Y-axis animation. Fixes mobile menu. Removes highlightjs prop.

* Changes xss call to renderString.

* Fixes renderString call.

* Removes unnecessary styling.

* Reverts mobile nav change.

* Nuxt 3 Lazy Loading Search (#1022)

* Uses lazyFetch for results. onSearchChange refreshes. Adds loading circle.

* Removes console.log

* Preserves old page when paging.

* Diagnosing filtering bugs.

* Fix single facet filtering

* Implements useAuth in settings/account.

* tiny ssr fix

* Updating nuxt.config checklist.

* Implements useAuth in revenue, moneitzation, and dashboard index pages.

* Fixes setups.

* Eliminates results when path changes. Adds animated logo.

* Ensures loading animation renders on search page.

---------

Co-authored-by: Jai A <jaiagr+gpg@pm.me>

* Fix navigation issues

* Square button fix (#1023)

* Removes checklist from nuxt.config.

* Modifies Nuxt CI to build after linting.

* Fixes prettierignore file.

* bug fixes

* Update whitelist domains

* Page improvements, fix CLS

* Fix a lot of things

* Fix project type redirect

* Fix 404 errors

* Fix user settings + hydration error

* Final fixes

* fix(creator-section): border radius on icons not aligning with bg (#1027)

Co-authored-by: MagnusHJensen <magnus.holm.jensen@lego.dk>

* Improvements to the mobile navbar (#984)

* Transition between animation states on TextLogo

* Remove unused refs

* Fixes from review

* Improvements to the mobile nav menu

* fix avatar alt text

* Nevermind, got confused for a moment

* Tab bar, menu layout improvements

* Highlight search icon when menu is open

* Update layouts/default.vue

Co-authored-by: Magnus Jensen <magnushjensen.mail@gmail.com>

* Fix some issues

* Use caret instead

* Run prettier

* Add create a project

---------

Co-authored-by: Magnus Jensen <magnushjensen.mail@gmail.com>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>

* Fix mobile menu issues

* More issues

* Fix lint

---------

Co-authored-by: Kaeden Murphy <kmurphy@kaedenmurphy.dev>
Co-authored-by: triphora <emmaffle@modrinth.com>
Co-authored-by: Zach Baird <30800863+ZachBaird@users.noreply.github.com>
Co-authored-by: stairman06 <36215135+stairman06@users.noreply.github.com>
Co-authored-by: Zachary Baird <zdb1994@yahoo.com>
Co-authored-by: Magnus Jensen <magnushjensen.mail@gmail.com>
Co-authored-by: MagnusHJensen <magnus.holm.jensen@lego.dk>
2023-03-09 10:05:32 -07:00

1599 lines
29 KiB
SCSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
Base components
*/
.multiselect--above .multiselect__content-wrapper {
border-top: none !important;
border-top-left-radius: var(--size-rounded-card) !important;
border-top-right-radius: var(--size-rounded-card) !important;
}
.known-error .multiselect__tags {
border-color: var(--color-special-red) !important;
background-color: var(--color-warning-bg) !important;
&::placeholder {
color: var(--color-warning-text);
}
}
.multiselect {
color: var(--color-text) !important;
outline: 2px solid transparent;
input {
background: transparent;
box-shadow: none;
}
input::placeholder {
color: var(--color-text);
}
.multiselect__tags {
border-radius: var(--size-rounded-sm);
background: var(--color-dropdown-bg);
box-shadow: var(--shadow-inset-sm);
border: none;
cursor: pointer;
padding-left: 7px;
padding-top: 10px;
transition: background-color 0.1s ease-in-out;
&:active {
background: var(--color-button-bg-hover);
.multiselect__spinner {
background: var(--color-button-bg-hover);
}
}
.multiselect__single {
background: transparent;
}
.multiselect__tag {
border-radius: var(--size-rounded-sm);
color: var(--color-text-dark);
background: transparent;
border: 2px solid var(--color-brand);
}
.multiselect__tag-icon {
background: transparent;
&:after {
color: var(--color-text-dark);
}
}
.multiselect__placeholder {
color: var(--color-button-text);
margin-left: 8px;
margin-bottom: 8px;
opacity: 0.6;
font-size: 16px;
line-height: 16px;
}
}
.multiselect__content-wrapper {
background: var(--color-dropdown-bg);
border: none;
overflow-x: hidden;
border-bottom-left-radius: var(--size-rounded-sm);
border-bottom-right-radius: var(--size-rounded-sm);
box-shadow: var(--shadow-inset-sm), var(--shadow-floating);
.multiselect__element {
.multiselect__option--highlight {
background: var(--color-button-bg-active);
color: var(--color-text-dark);
}
.multiselect__option--selected {
background: var(--color-brand);
font-weight: bold;
color: var(--color-brand-inverted);
}
}
}
.multiselect__spinner {
background: var(--color-dropdown-bg);
&:active {
background: var(--color-button-bg-hover);
}
}
&.multiselect--disabled {
background: none;
.multiselect__current,
.multiselect__select {
background: none;
}
}
}
.grid-display {
display: grid;
grid-gap: var(--spacing-card-md);
grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
.grid-display__item {
display: flex;
flex-grow: 1;
flex-direction: column;
justify-content: flex-start;
background-color: var(--color-bg);
border-radius: var(--size-rounded-card);
padding: var(--spacing-card-lg);
gap: var(--spacing-card-md);
.label {
color: var(--color-heading);
font-weight: bold;
font-size: 1rem;
}
.value {
color: var(--color-text-dark);
font-weight: bold;
font-size: 2rem;
}
.goto-link {
margin-top: auto;
}
}
&.width-12 {
grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}
&.width-16 {
grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
}
/*
Cards and body styling
*/
.base-card {
@extend .padding-lg;
position: relative;
min-height: var(--font-size-2xl);
background-color: var(--color-raised-bg);
border-radius: var(--size-rounded-card);
margin-bottom: var(--spacing-card-md);
outline: 2px solid transparent;
box-shadow: var(--shadow-card);
.card__overlay {
position: absolute;
top: 1rem;
right: 1rem;
display: flex;
flex-direction: column;
align-items: flex-end;
grid-gap: 0.5rem;
z-index: 2;
}
&:where(&.warning, &.information) {
padding: 1.5rem;
line-height: 1.5;
min-height: 0;
a {
/* Uses active color to increase contrast */
color: var(--color-link-active);
text-decoration: underline;
}
}
&.warning {
border-left: 0.5rem solid var(--color-warning-banner-side);
background-color: var(--color-warning-banner-bg);
color: var(--color-warning-banner-text);
}
&.information {
border-left: 0.5rem solid var(--color-info-banner-side);
background-color: var(--color-info-banner-bg);
color: var(--color-info-banner-text);
}
&.moderation-card {
background-color: var(--color-warning-banner-bg);
}
}
.universal-labels {
label,
.label {
:where(.label__title) {
display: block;
margin-block: var(--spacing-card-md) var(--spacing-card-sm);
// Same styling as h3
color: var(--color-text-dark);
font-size: 1.17rem;
font-weight: bold;
.required {
color: var(--color-special-red);
}
&.size-card-header {
font-size: var(--font-size-xl);
margin-bottom: 1rem;
}
}
:where(.label__description) {
display: block;
margin-block-end: var(--spacing-card-sm);
.label__subdescription {
display: block;
margin-block-start: var(--spacing-card-md);
}
}
:where(h1, h2, h3, h4) {
margin-block: 0;
}
}
}
.padding-lg {
padding: var(--spacing-card-lg);
}
.padding-bg {
padding: var(--spacing-card-bg);
}
.padding-md {
padding: var(--spacing-card-md);
}
.padding-sm {
padding: var(--spacing-card-sm);
}
.padding-0 {
padding: 0;
}
.padding-block-lg {
padding-block: var(--spacing-card-lg);
}
.padding-block-bg {
padding-block: var(--spacing-card-bg);
}
.padding-block-md {
padding-block: var(--spacing-card-md);
}
.padding-block-sm {
padding-block: var(--spacing-card-sm);
}
.padding-block-0 {
padding-block: 0;
}
.padding-inline-lg {
padding-inline: var(--spacing-card-lg);
}
.padding-inline-bg {
padding-inline: var(--spacing-card-bg);
}
.padding-inline-md {
padding-inline: var(--spacing-card-md);
}
.padding-inline-sm {
padding-inline: var(--spacing-card-sm);
}
.padding-inline-0 {
padding-inline: 0;
}
.universal-body {
@extend .universal-labels;
.multiselect {
width: 15rem;
}
> :where(
input + *,
.input-group + *,
.textarea-wrapper + *,
.chips + *,
.resizable-textarea-wrapper + *,
.input-div + *
) {
margin-block-start: var(--spacing-card-md);
}
:where(button, .button, .iconified-button) {
width: fit-content;
}
.input-group {
input {
width: auto;
flex-basis: 0;
}
}
:where(input) {
box-sizing: border-box;
max-height: 40px;
width: 24rem;
flex-basis: 24rem;
&:not(.stylized-toggle) {
max-width: 100%;
}
}
:where(.adjacent-input, &.adjacent-input) {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
gap: var(--spacing-card-sm);
margin-bottom: calc(var(--spacing-card-sm) + var(--spacing-card-md));
.iconified-button,
.input-group {
flex-shrink: 0;
}
input {
flex-shrink: 1;
}
> :first-child {
flex-shrink: 2;
flex-grow: 1;
flex-basis: min-content;
}
label,
.label {
.label__title {
margin-block: 0;
}
.label__description {
margin-block-end: 0;
}
.label__description:not(:first-child) {
margin-top: var(--spacing-card-sm);
}
}
@media screen and (max-width: 750px) {
&:not(&.small) {
flex-direction: column;
align-items: start;
.stylized-toggle {
flex-basis: 0;
}
}
}
}
h1 {
display: flex;
align-items: center;
}
> :first-child {
margin-block-start: 0;
}
> :last-child {
margin-block-end: 0;
}
:where(.header__row) {
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: var(--spacing-card-sm);
* {
flex-shrink: 0;
}
.header__title {
margin: 0;
flex-grow: 1;
}
&:not(:last-child) {
margin-bottom: var(--spacing-card-md);
}
}
//> .label:first-child :where(> :first-child, .label__title),
//> label:first-child :where(> :first-child, .label__title),
//> .adjacent-input:first-child :where(> :first-child, .label__title) {
// margin-block-start: 0;
//}
}
.universal-card {
@extend .base-card;
@extend .universal-body;
}
.universal-modal {
@extend .universal-body;
padding: var(--spacing-card-bg);
display: flex;
flex-direction: column;
> p:first-child {
margin-top: 0;
}
@media screen and (max-width: 750px) {
.adjacent-input,
&.adjacent-input &:not(&.small) {
flex-direction: row;
align-items: center;
}
}
@media screen and (max-width: calc(600px + 2rem)) {
.adjacent-input,
&.adjacent-input &:not(&.small) {
flex-direction: column;
align-items: start;
}
}
}
.navigation-card {
@extend .base-card;
@extend .padding-inline-lg;
@extend .padding-block-md;
align-items: center;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
row-gap: 0.5rem;
}
/*
Other
*/
// Here lies 𝖄𝖊 𝕸𝖆𝖗𝖌𝖎𝖓 𝕸𝖆𝖌𝖎𝖈
// which allows to have just one wrapper div
.iconified-input {
align-items: center;
display: inline-flex;
position: relative;
input {
padding-left: 2.25rem;
width: 100%;
}
&:focus-within svg {
color: var(--color-button-text-active);
opacity: 1;
}
svg {
position: absolute;
left: 0.75rem;
height: 1.25rem;
width: 1.25rem;
z-index: 1;
color: var(--color-button-text);
opacity: 0.6;
}
}
.text-link {
color: var(--color-link);
text-decoration: underline;
&:focus-visible,
&:hover {
color: var(--color-link-hover);
cursor: pointer;
}
&:active {
color: var(--color-link-active);
}
}
.title-link {
text-decoration: underline;
&:focus-visible,
&:hover {
color: var(--color-heading);
}
&:active {
color: var(--color-text-dark);
}
}
.markdown-body {
h1:first-child {
margin-top: 0;
}
blockquote,
details,
dl,
ol,
p,
code,
pre,
table,
ul {
margin-top: 0;
margin-bottom: 16px;
}
li,
p {
padding: 0;
line-height: 1.5;
}
h1,
h2 {
padding: 10px 0 5px;
border-bottom: 1px solid var(--color-header-underline);
}
h1,
h2,
h3,
h4,
h5,
h6,
li,
p {
word-wrap: break-word;
overflow-wrap: anywhere;
}
blockquote {
padding: 0 1em;
color: var(--color-text);
border-left: 0.25em solid var(--color-block-quote);
}
a {
color: var(--color-link);
&:focus-visible,
&:hover {
color: var(--color-link-hover);
}
&:active {
color: var(--color-link-active);
}
}
img {
max-width: 100%;
height: auto;
}
html:not(.dark-mode, .oled-mode) & img[src$='#gh-dark-mode-only'] {
display: none;
}
html:is(.dark-mode, .oled-mode) & img[src$='#gh-light-mode-only'] {
display: none;
}
pre {
margin-top: 1rem;
padding: 14px;
border-radius: var(--size-rounded-sm);
background-color: var(--color-code-bg);
overflow-x: auto;
code {
font-size: 80%;
padding: 0;
border-radius: 0;
}
}
code {
padding: 0.2em 0.4em;
font-size: 80%;
border-radius: var(--size-rounded-sm);
background-color: var(--color-code-bg);
color: var(--color-code-text);
}
hr {
margin: 20px 0;
color: var(--color-divider);
}
table {
display: block;
width: max-content;
max-width: 100%;
overflow: auto;
border-collapse: separate;
border-spacing: 0;
line-height: 1.5;
border: 0.05rem solid var(--color-table-border);
border-radius: var(--size-rounded-sm);
th {
font-weight: 600;
}
td,
th {
padding: 0.4rem 0.85rem;
border: 0.05rem solid var(--color-table-border);
}
tr:nth-child(2n) {
background-color: var(--color-table-alternate-row);
}
th:first-of-type {
border-top-left-radius: var(--size-rounded-sm);
}
th:last-of-type {
border-top-right-radius: var(--size-rounded-sm);
}
tr:last-of-type td:first-of-type {
border-bottom-left-radius: var(--size-rounded-sm);
}
tr:last-of-type td:last-of-type {
border-bottom-right-radius: var(--size-rounded-sm);
}
}
details {
border: 0.15rem solid var(--color-button-bg);
border-radius: var(--size-rounded-sm);
padding: 0.5rem 0.5rem 0;
summary {
font-weight: bold;
margin: -0.5rem -0.5rem 0;
padding: 0.5rem 0.8rem;
cursor: pointer;
background-color: var(--color-button-bg);
border-radius: var(--size-rounded-xs);
&:hover {
background-color: var(--color-button-bg-hover);
}
}
&[open] {
padding: 0.5rem;
summary {
margin-bottom: 0.5rem;
border-radius: var(--size-rounded-xs) var(--size-rounded-xs) 0 0;
}
> :last-child:not(summary) {
margin-bottom: 0 !important;
}
}
}
> :last-child {
margin-bottom: 0 !important;
}
iframe,
video {
aspect-ratio: 16 / 9;
width: 850px;
height: auto;
}
@media screen and (max-width: 850px) {
iframe,
video {
width: 100%;
}
}
}
.v-popper--theme-tooltip {
.v-popper__inner {
background: var(--color-tooltip-bg) !important;
color: var(--color-tooltip-text) !important;
padding: 5px 10px 4px !important;
border-radius: var(--size-rounded-tooltip) !important;
box-shadow: var(--shadow-floating) !important;
font-size: 0.9rem !important;
}
.v-popper__arrow-outer,
.v-popper__arrow-inner {
border-color: var(--color-tooltip-bg) !important;
}
}
.button-animation {
transition: opacity 0.5s ease-in-out, filter 0.2s ease-in-out, transform 0.05s ease-in-out,
outline 0.2s ease-in-out;
&:active:not(&:disabled) {
transform: scale(0.95);
}
}
.button-base {
@extend .button-animation;
font-weight: 500;
outline: 2px solid transparent;
&:focus-visible:not(&:disabled),
&:hover:not(&:disabled) {
cursor: pointer;
filter: brightness(0.85);
}
&:active:not(&:disabled) {
filter: brightness(0.8);
}
&:disabled,
&[disabled] {
cursor: not-allowed;
filter: grayscale(50%);
opacity: 0.5;
box-shadow: none;
}
}
:not(tr).button-transparent {
@extend .button-base;
background-color: transparent;
border-radius: var(--size-rounded-sm);
&:focus-visible:not(&:disabled),
&:hover:not(&:disabled),
&:active:not(&:disabled) {
background-color: var(--color-raised-bg);
}
}
tr.button-transparent {
@extend .button-animation;
background-color: transparent;
border-radius: var(--size-rounded-sm);
&:focus-visible:not(&:disabled) > *,
&:hover:not(&:disabled) > * {
cursor: pointer;
filter: brightness(0.85);
background-color: var(--color-raised-bg);
}
&:active:not(&:disabled) > * {
filter: brightness(0.8);
background-color: var(--color-raised-bg);
}
&:disabled > *,
&[disabled] > * {
cursor: not-allowed;
filter: grayscale(50%);
opacity: 0.5;
box-shadow: none;
}
}
.button-within {
transition: opacity 0.5s ease-in-out, filter 0.2s ease-in-out, transform 0.05s ease-in-out,
outline 0.2s ease-in-out;
&:focus-visible:not(&.disabled),
&:hover:not(&.disabled) {
filter: brightness(0.85);
}
&:active:not(&.disabled) {
filter: brightness(0.8);
}
// For some reason this within the above block makes it universal and not only applied to children. SCSS bug maybe?
&:active:not(&.disabled) button:not(&:disabled) {
transform: scale(0.95);
}
&.disabled {
cursor: not-allowed;
filter: grayscale(50%);
opacity: 0.5;
box-shadow: none;
&disabled,
&[disabled] {
cursor: not-allowed;
box-shadow: none;
}
}
}
.button-color-base {
box-sizing: border-box;
--text-color: var(--color-button-text);
--background-color: var(--color-button-bg);
color: var(--text-color);
background-color: var(--background-color);
box-shadow: var(--shadow-inset-sm), 0 0 0 0 transparent;
border-radius: var(--size-rounded-sm);
}
.iconified-button {
@extend .button-base;
@extend .button-color-base;
display: flex;
padding: var(--spacing-card-sm) var(--spacing-card-bg);
margin: 0;
font-size: var(--font-size-nm);
align-items: center;
cursor: pointer;
width: fit-content;
height: fit-content;
text-decoration: none;
svg {
width: 1.1rem;
height: 1.1rem;
margin-right: 0.5rem;
}
&.icon-only {
padding: 0 0.5rem;
svg {
margin-right: 0;
}
}
&.transparent {
background: none;
box-shadow: none;
}
&.bold-button {
font-weight: bold;
}
}
.square-button {
@extend .button-base;
--text-color: var(--color-button-text);
--background-color: var(--color-button-bg);
display: flex;
align-items: center;
justify-content: center;
height: 2.25rem;
width: 2.25rem;
border-radius: var(--size-rounded-sm);
color: var(--text-color);
background-color: var(--background-color);
box-shadow: var(--shadow-inset-sm), 0 0 0 0 transparent;
svg {
min-width: 1.25rem;
max-width: 1.25rem;
min-height: 1.25rem;
max-height: 1.25rem;
margin: auto;
}
flex-shrink: 0;
}
.header-button {
@extend .iconified-button;
box-sizing: content-box;
min-height: unset;
border-radius: var(--size-rounded-max);
white-space: nowrap;
padding: 0.5rem 0.75rem;
max-height: 1.75rem;
svg {
vertical-align: middle;
margin-right: 0.5rem;
height: 1.25rem;
width: 1.25rem;
}
}
.raised-button {
--background-color: var(--color-raised-bg);
box-shadow: var(--shadow-inset-sm), var(--shadow-raised);
}
.danger-button {
--background-color: var(--color-special-red);
--text-color: var(--color-brand-inverted);
}
.moderation-button {
--background-color: var(--color-special-orange);
--text-color: var(--color-brand-inverted);
}
.brand-button {
--background-color: var(--color-brand);
--text-color: var(--color-brand-inverted);
}
.alt-brand-button {
--background-color: var(--color-brand-highlight);
--text-color: var(--color-text);
}
.button-group {
display: flex;
grid-gap: var(--spacing-card-sm);
flex-wrap: wrap;
}
.multiselect--above .multiselect__content-wrapper {
border-top: none !important;
border-top-left-radius: var(--size-rounded-card) !important;
border-top-right-radius: var(--size-rounded-card) !important;
}
.known-error .multiselect__tags {
border-color: var(--color-special-red) !important;
background-color: var(--color-warning-bg) !important;
&::placeholder {
color: var(--color-warning-text);
}
}
.multiselect {
&.raised-multiselect {
.multiselect__tags,
.multiselect__content-wrapper,
.multiselect__spinner {
background-color: var(--color-raised-bg);
box-shadow: none;
}
}
color: var(--color-text) !important;
outline: 2px solid transparent;
input {
background: transparent;
box-shadow: none;
}
input::placeholder {
color: var(--color-text);
}
.multiselect__tags {
border-radius: var(--size-rounded-sm);
background: var(--color-dropdown-bg);
box-shadow: var(--shadow-inset-sm);
border: none;
cursor: pointer;
padding-left: 7px;
padding-top: 10px;
transition: background-color 0.1s ease-in-out;
&:active {
background: var(--color-button-bg-hover);
.multiselect__spinner {
background: var(--color-button-bg-hover);
}
}
.multiselect__single {
background: transparent;
}
.multiselect__tag {
border-radius: var(--size-rounded-sm);
color: var(--color-text-dark);
background: transparent;
border: 2px solid var(--color-brand);
}
.multiselect__tag-icon {
background: transparent;
&:after {
color: var(--color-text-dark);
}
}
.multiselect__placeholder {
color: var(--color-button-text);
margin-left: 8px;
margin-bottom: 8px;
opacity: 0.6;
font-size: 16px;
line-height: 16px;
}
}
.multiselect__content-wrapper {
background: var(--color-dropdown-bg);
border: none;
overflow-x: hidden;
border-bottom-left-radius: var(--size-rounded-sm);
border-bottom-right-radius: var(--size-rounded-sm);
box-shadow: var(--shadow-inset-sm), var(--shadow-floating);
.multiselect__element {
.multiselect__option--highlight {
background: var(--color-button-bg-active);
color: var(--color-text-dark);
}
.multiselect__option--selected {
background: var(--color-brand);
font-weight: bold;
color: var(--color-brand-inverted);
}
}
}
.multiselect__spinner {
background: var(--color-dropdown-bg);
&:active {
background: var(--color-button-bg-hover);
}
}
&.multiselect--disabled {
background: none;
.multiselect__current,
.multiselect__select {
background: none;
}
}
}
.switch {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
-webkit-tap-highlight-color: transparent;
cursor: pointer;
&:focus {
//outline: 0; Bad for accessibility
}
}
.stylized-toggle {
@extend .button-base;
box-sizing: content-box;
min-height: 32px;
height: 32px;
width: 52px;
max-width: 52px;
border-radius: var(--size-rounded-max);
display: inline-block;
position: relative;
margin: 0;
transition: all 0.2s ease;
background: var(--color-button-bg);
&:after {
content: '';
position: absolute;
top: 7px;
left: 7px;
width: 18px;
height: 18px;
border-radius: 50%;
background: var(--color-toggle-handle);
transition: all 0.2s cubic-bezier(0.5, 0.1, 0.75, 1.35);
outline: 2px solid transparent;
@media (prefers-reduced-motion) {
transition: none;
}
}
&:checked {
background-color: var(--color-brand);
&:after {
transform: translatex(20px);
background: var(--color-brand-inverted);
}
}
&:hover &:focus {
background: var(--color-button-bg);
}
}
.textarea-wrapper {
display: flex;
flex-direction: column;
align-items: stretch;
textarea {
border-radius: var(--size-rounded-sm);
flex: 1;
overflow-y: auto;
resize: none;
max-width: 100%;
}
}
.resizable-textarea-wrapper {
display: block;
textarea {
border-radius: var(--size-rounded-sm);
min-height: 10rem;
width: calc(100% - var(--spacing-card-lg) - var(--spacing-card-sm));
resize: vertical;
}
}
.error {
display: flex;
flex-direction: column;
width: 100%;
justify-content: center;
align-items: center;
.icon {
width: 8rem;
height: 8rem;
margin: 1.5rem 0;
}
.text {
margin-bottom: 2rem;
font-size: 1.25rem;
text-align: center;
}
.link {
cursor: pointer;
text-decoration: underline;
}
}
.card {
position: relative;
min-height: var(--font-size-2xl);
padding: var(--spacing-card-md) var(--spacing-card-lg);
background: var(--color-raised-bg);
border-radius: var(--size-rounded-card);
outline: 2px solid transparent;
margin-bottom: var(--spacing-card-md);
box-shadow: var(--shadow-card);
.card__overlay {
position: absolute;
top: 1rem;
right: 1rem;
display: flex;
flex-direction: column;
align-items: flex-end;
grid-gap: 0.5rem;
z-index: 2;
}
&:where(&.warning, &.information) {
padding: 1.5rem;
line-height: 1.5;
min-height: 0;
a {
/* Uses active color to increase contrast */
color: var(--color-link-active);
text-decoration: underline;
}
}
&.warning {
border-left: 0.5rem solid var(--color-warning-banner-side);
background-color: var(--color-warning-banner-bg);
color: var(--color-warning-banner-text);
}
&.information {
border-left: 0.5rem solid var(--color-info-banner-side);
background-color: var(--color-info-banner-bg);
color: var(--color-info-banner-text);
}
}
.card-divider {
background-color: var(--color-divider);
border: none;
color: var(--color-divider);
height: 1px;
margin: var(--spacing-card-bg) 0;
}
.text-input-wrapper.known-error,
input.known-error,
textarea.known-error {
outline: 2px solid var(--color-special-red);
background-color: var(--color-warning-bg) !important;
&::placeholder {
color: var(--color-warning-text);
}
}
.known-errors {
min-height: 0;
color: var(--color-special-red);
ul {
margin: 0;
}
}
.goto-link {
display: flex;
align-items: center;
gap: 3px;
color: var(--color-link);
}
.goto-link:hover,
.goto-link:focus-visible {
color: var(--color-link-hover);
}
.goto-link:active {
color: var(--color-link-active);
}
h1 {
.beta-badge {
font-size: 0.4em;
}
}
.beta-badge {
font-size: 0.7em;
padding: 0.2rem 0.4rem;
background-color: transparent;
box-sizing: border-box;
border: 2px solid var(--color-text);
color: var(--color-text);
border-radius: var(--size-rounded-max);
margin-left: 0.5rem;
font-weight: bold;
}
.router-link-exact-active,
h1,
h2,
h3 {
.beta-badge {
background-color: var(--color-button-text-active);
box-sizing: border-box;
border-color: transparent;
color: var(--color-raised-bg);
}
}
@media (prefers-reduced-motion) {
.button-animation,
button {
transform: none !important;
}
}
.push-right:not(.input-group),
.push-right.input-group > :first-child {
margin-left: auto;
margin-right: 0;
}
.full-width-inputs {
.multiselect,
input,
.iconified-input {
width: 100%;
flex-basis: 100%;
}
}
input,
button {
&:disabled {
cursor: not-allowed !important;
}
}
.legacy-label-styles {
label {
display: flex;
flex-direction: column;
margin-bottom: 0.5rem;
&.no-margin {
margin-bottom: 0;
}
@media screen and (min-width: 1024px) {
flex-direction: row;
align-items: center;
}
> span {
flex: 2;
padding-right: var(--spacing-card-lg);
&.no-padding {
padding-right: 0;
}
}
> input,
> .multiselect,
> .input-group {
flex: 3;
height: fit-content;
}
> input[type='button'] {
height: fit-content;
flex: 1;
}
> input[type='button']:hover {
cursor: pointer;
}
> div,
> a {
height: fit-content;
flex: 1;
}
> div:hover {
cursor: pointer;
}
}
}
.input-group {
display: flex;
flex-direction: row;
grid-gap: var(--spacing-card-sm);
flex-wrap: wrap;
max-width: 100%;
align-items: center;
.multiselect {
width: 15rem;
}
input {
flex-shrink: 2;
}
&.shrink-first {
:first-child {
flex-shrink: 2;
flex-grow: 1;
flex-basis: min-content;
}
:not(:first-child) {
flex-shrink: 1;
}
}
}
.input-stack {
display: flex;
flex-direction: column;
> * {
margin-bottom: var(--spacing-card-sm);
}
> .multiselect {
width: unset;
height: inherit;
}
}
.text-input-wrapper {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
background: var(--color-button-bg);
width: fit-content;
border-radius: var(--size-rounded-sm);
box-shadow: var(--shadow-inset-sm), 0 0 0 0 transparent;
transition: box-shadow 0.1s ease-in-out;
overflow: hidden;
max-width: 100%;
.text-input-wrapper__before {
display: flex;
color: var(--color-text);
padding: 0.5rem 0 0.5rem 1rem;
font-weight: var(--font-weight-medium);
min-height: 40px;
box-sizing: border-box;
width: fit-content;
align-items: center;
filter: grayscale(50%);
opacity: 0.5;
box-shadow: none;
flex-shrink: 0;
}
input,
textarea {
border-radius: 0;
background-color: transparent;
box-shadow: unset;
padding-left: 0;
flex-grow: 1;
}
&:focus,
&:focus-visible,
&:focus-within {
box-shadow: inset 0 0 0 transparent, 0 0 0 0.25rem var(--color-brand-shadow);
color: var(--color-button-text-active);
}
}
.primary-stat {
align-items: center;
display: flex;
margin-bottom: 0.6rem;
.primary-stat__icon {
height: 1rem;
width: 1rem;
}
.primary-stat__text {
margin-left: 0.4rem;
}
.primary-stat__counter {
font-size: var(--font-size-lg);
font-weight: bold;
}
}
.project-list {
width: 100%;
gap: var(--spacing-card-md);
overflow: hidden;
&:not(:first-child) {
margin-top: var(--spacing-card-md);
}
&:not(:empty) {
margin-bottom: var(--spacing-card-md);
}
}
.project-list.display-mode--list {
display: flex;
flex-direction: column;
}
.project-list.display-mode--gallery {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
@media screen and (max-width: 750px) {
grid-template-columns: repeat(1, minmax(0, 1fr));
}
}
.project-list.display-mode--grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
@media screen and (max-width: 80rem) {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media screen and (max-width: 1024px) {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media screen and (max-width: 860px) {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media screen and (max-width: 550px) {
display: flex;
flex-direction: column;
}
}
.wrap-as-needed {
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-word;
-webkit-hyphens: auto;
hyphens: auto;
}
.sr-only {
position: absolute;
width: 0;
height: 0;
overflow: hidden;
}