🔥 Huge style refactoring by using SvelteKit built-in style tag

It's been tricky but got there finally! Hello `:global`
- Avoid using one global CSS file containing everything
- Import the component SCSS file in a script tag from the component file to allow style scoping and including it only when used
This commit is contained in:
2022-06-22 23:25:08 +02:00
parent 4f81640b61
commit cdabe6935b
89 changed files with 1779 additions and 1735 deletions

View File

@@ -1,40 +1,25 @@
// Subscribe Page
.subscribe {
// Modules
.grid-modules {
grid-column: span var(--columns);
margin: 96px 20px 0;
padding-bottom: 40px;
&__top {
// Email Form
:global(.newsletter-form) {
margin: 42px auto 70px;
padding: 0 20px;
max-width: max(432px, 70%);
@include bp (sm) {
grid-column: 2 / span 22;
margin: 200px 0 72px;
}
}
// Email Form
.newsletter-form {
margin: 42px auto 70px;
padding: 0 20px;
max-width: max(432px, 70%);
@include bp (sm) {
max-width: 560px;
margin-top: 0;
margin-bottom: 120px;
}
&__email {
input {
color: #fff;
&::placeholder {
color: rgba($color-tertiary, 0.6);
}
@include bp (sm) {
max-width: 560px;
margin-top: 0;
margin-bottom: 120px;
}
}
&__bottom {
p {
:global(.newsletter-form__email) {
:global(input) {
color: #fff;
}
}
:global(.newsletter-form__bottom) {
:global(p) {
color: rgba($color-tertiary, 0.6);
}
}
@@ -74,12 +59,17 @@
}
}
}
}
.globe--cropped {
margin-top: 96px;
// Globe
:global(.globe--cropped) {
margin-top: 96px;
@include bp (sm) {
margin-top: 156px;
}
@include bp (sm) {
margin-top: 156px;
}
}
}
// Issue
@import "../molecules/issue";