FIX: Wizard css was overriding some of core css (#17126)

* Use `var()`
* Remove imports
* Scope all wizard css to `body.wizard`
This commit is contained in:
Jarek Radosz 2022-06-17 17:28:54 +02:00 committed by GitHub
parent 1ada3a9404
commit a69b914710
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,11 +1,3 @@
@import "color_definitions";
@import "vendor/normalize";
@import "vendor/normalize-ext";
@import "common/foundation/colors";
@import "common/select-kit/_index";
@import "common/components/svg";
@import "common/base/modal";
$bubbles-mask: svg-uri( $bubbles-mask: svg-uri(
'<svg xmlns="http://www.w3.org/2000/svg" width="415.2" height="414" viewBox="0 0 415.2 414"> '<svg xmlns="http://www.w3.org/2000/svg" width="415.2" height="414" viewBox="0 0 415.2 414">
<defs> <defs>
@ -722,7 +714,7 @@ $bubbles-mask: svg-uri(
body.wizard { body.wizard {
background: var(--secondary) $bubbles-mask; background: var(--secondary) $bubbles-mask;
color: var(--primary-very-high); color: var(--primary-very-high);
line-height: $line-height-large; line-height: var(--line-height-large);
font-size: 15px; font-size: 15px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen-Sans, Ubuntu, Cantarell, Arial, sans-serif; Oxygen-Sans, Ubuntu, Cantarell, Arial, sans-serif;
@ -736,9 +728,8 @@ body.wizard {
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
} }
}
.finish-installation { .finish-installation {
.tada { .tada {
width: 300px; width: 300px;
} }
@ -751,9 +742,9 @@ body.wizard {
.help-text { .help-text {
color: var(--primary-medium); color: var(--primary-medium);
} }
} }
.discourse-logo { .discourse-logo {
&, &,
svg { svg {
height: 30px; height: 30px;
@ -763,9 +754,9 @@ body.wizard {
.logo-contour { .logo-contour {
fill: var(--primary); fill: var(--primary);
} }
} }
.wizard-warning { .wizard-warning {
font-family: sans-serif; font-family: sans-serif;
p { p {
@ -782,28 +773,28 @@ body.wizard {
.sa-icon { .sa-icon {
display: none !important; display: none !important;
} }
} }
.select { .select {
width: 400px; width: 400px;
} }
.hidden { .hidden {
display: none; display: none;
} }
.wizard-canvas { .wizard-canvas {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
z-index: 10; z-index: 10;
} }
.staff-count { .staff-count {
font-weight: bold; font-weight: bold;
} }
.wizard-step-privacy { .wizard-step-privacy {
label[for="privacy_options"] .field-description { label[for="privacy_options"] .field-description {
margin-bottom: 1em; margin-bottom: 1em;
font-weight: bold; font-weight: bold;
@ -816,9 +807,9 @@ body.wizard {
font-weight: normal; font-weight: normal;
} }
} }
} }
.wizard-step-form { .wizard-step-form {
max-height: 500px; max-height: 500px;
display: flex; display: flex;
@ -838,9 +829,9 @@ body.wizard {
width: calc(100% - 170px); width: calc(100% - 170px);
} }
} }
} }
.wizard-step-styling { .wizard-step-styling {
.preview-nav { .preview-nav {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
@ -893,9 +884,9 @@ body.wizard {
padding-right: 20px; padding-right: 20px;
} }
} }
} }
.wizard-column { .wizard-column {
position: relative; position: relative;
z-index: 11; z-index: 11;
background-color: var(--secondary); background-color: var(--secondary);
@ -972,7 +963,7 @@ body.wizard {
span { span {
position: absolute; position: absolute;
font-size: $font-0; font-size: var(--font-0);
mix-blend-mode: difference; mix-blend-mode: difference;
color: var(--secondary-or-primary); color: var(--secondary-or-primary);
z-index: 13; z-index: 13;
@ -999,7 +990,7 @@ body.wizard {
.wizard-btn { .wizard-btn {
border-radius: 2px; border-radius: 2px;
font-size: $font-0; font-size: var(--font-0);
border: 0; border: 0;
padding: 0.5em; padding: 0.5em;
transition: background-color 0.3s; transition: background-color 0.3s;
@ -1012,7 +1003,7 @@ body.wizard {
&.small { &.small {
padding: 0.25em 0.5em; padding: 0.25em 0.5em;
font-size: $font-down-1; font-size: var(--font-down-1);
} }
&:hover, &:hover,
@ -1195,34 +1186,34 @@ body.wizard {
.wizard-image-row canvas { .wizard-image-row canvas {
border: 1px solid rgba(0, 0, 0, 0.2); border: 1px solid rgba(0, 0, 0, 0.2);
} }
} }
.textarea-field textarea { .textarea-field textarea {
width: 100%; width: 100%;
height: 10em; height: 10em;
padding: 6px; padding: 6px;
background: var(--secondary); background: var(--secondary);
} }
.text-field input { .text-field input {
width: 100%; width: 100%;
font-size: $font-up-1; font-size: var(--font-up-1);
margin: 0; margin: 0;
padding: 6px; padding: 6px;
background-color: var(--secondary); background-color: var(--secondary);
border: 1px solid var(--primary-low-mid); border: 1px solid var(--primary-low-mid);
transition: border-color 0.5s; transition: border-color 0.5s;
} }
.textarea-field.invalid textarea, .textarea-field.invalid textarea,
.text-field.invalid input { .text-field.invalid input {
outline: 0; outline: 0;
border: 3px solid var(--danger); border: 3px solid var(--danger);
animation: bump 0.25s ease-in-out; animation: bump 0.25s ease-in-out;
animation-iteration-count: 2; animation-iteration-count: 2;
} }
.radio-field-choice { .radio-field-choice {
margin-bottom: 1.25em; margin-bottom: 1.25em;
.radio-label { .radio-label {
@ -1234,9 +1225,9 @@ body.wizard {
margin-left: 1.75em; margin-left: 1.75em;
color: var(--primary-high); color: var(--primary-high);
} }
} }
.invite-list { .invite-list {
.users-list { .users-list {
margin-bottom: 1em; margin-bottom: 1em;
@ -1273,9 +1264,9 @@ body.wizard {
margin-right: 0.5em; margin-right: 0.5em;
} }
} }
} }
.modal-footer { .modal-footer {
a.btn { a.btn {
text-decoration: none; text-decoration: none;
display: inline-block; display: inline-block;
@ -1295,18 +1286,12 @@ body.wizard {
} }
} }
} }
} }
@media only screen and (min-device-width: 569px) {
@import "desktop/modal";
}
/* fix wizard for mobile -- iPhone 5 default width */
@media only screen and (max-device-width: 568px) {
@import "mobile/modal";
/* fix wizard for mobile -- iPhone 5 default width */
@media only screen and (max-device-width: 568px) {
h1 { h1 {
font-size: $font-up-2 !important; font-size: var(--font-up-2) !important;
} }
.wizard-column { .wizard-column {
margin: auto !important; margin: auto !important;
@ -1365,4 +1350,5 @@ body.wizard {
max-width: 225px; max-width: 225px;
} }
} }
}
} }