Skip to content

Commit

Permalink
Task/fix sass deprecations (#784)
Browse files Browse the repository at this point in the history
* Fix deprecated @import in sass files

* Fix editor styles for next-events
  • Loading branch information
albig authored Dec 4, 2024
1 parent 16f149e commit ecb6ca9
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 28 deletions.
10 changes: 5 additions & 5 deletions assets/css/editor-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,6 @@
}
}

.styled-layout .wp-block-group {
padding-top: 100px;
padding-bottom: 100px;
}

/* Main column width */
.wp-block {
max-width: 860px;
Expand Down Expand Up @@ -483,6 +478,11 @@ p a {
padding-bottom: 100px;
}

.styled-layout .wp-block-group > * {
padding-top: 0;
padding-bottom: 0;
}

@media (max-width: 767.98px) {
.styled-layout .wp-block-group {
padding-top: 50px;
Expand Down
13 changes: 7 additions & 6 deletions sass/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use "sass:map";
$custom-colors: (
klee: #008939,
klee-700: #006e2e,
Expand All @@ -14,17 +15,17 @@ $custom-colors: (
);


$primary: map-get($custom-colors, "klee");
$secondary: map-get($custom-colors, "tanne");
$white: map-get($custom-colors, "white");
$primary: map.get($custom-colors, "klee");
$secondary: map.get($custom-colors, "tanne");
$white: map.get($custom-colors, "white");

$black: map-get($custom-colors, "black");
$black-500: map-get($custom-colors, "black-500");
$black: map.get($custom-colors, "black");
$black-500: map.get($custom-colors, "black-500");

$white-90: rgba(255, 255, 255, 0.9);

$dark: #ddd;
$gray-500: map-get($custom-colors, "gray-500");
$gray-500: map.get($custom-colors, "gray-500");
$darkgray: #333;
$lightgray: #aeb2ad;
$very-light-gray: #d6d9d6;
Expand Down
6 changes: 3 additions & 3 deletions src/accordion/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Try to style the editor accordion like in the frontend without bootstrap
*/

@import "../../sass/variables";
@use "../../sass/variables";

.wp-block-sunflower-accordion {

Expand All @@ -24,15 +24,15 @@
padding: 1rem 1.25rem;
font-size: 1.1875rem;
text-align: left;
background-color: $secondary;
background-color: variables.$secondary;
border: 0;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
overflow-anchor: none;

input[type="text"] {
color: #fff;
background-color: $secondary;
background-color: variables.$secondary;
padding: 2px;
border: none;
font-size: 19px;
Expand Down
8 changes: 4 additions & 4 deletions src/contact-form/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Try to style the editor accordion like in the frontend without bootstrap
*/

@import "../../sass/variables";
@use "../../sass/variables";

*,
*::before,
Expand All @@ -18,9 +18,9 @@

&-respond {

background-color: $white;
background-color: variables.$white;
padding: 30px;
border-radius: $border-radius;
border-radius: variables.$border-radius;

label {
display: block;
Expand All @@ -33,7 +33,7 @@
}

.form-submit input {
background-color: $secondary;
background-color: variables.$secondary;
text-transform: uppercase;
font-size: 1rem;
border-radius: 4px;
Expand Down
8 changes: 4 additions & 4 deletions src/latest-posts/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Try to style the editor accordion like in the frontend without bootstrap
*/

@import "../../sass/variables";
@use "../../sass/variables";

.wp-block-sunflower-latest-posts {

Expand All @@ -13,7 +13,7 @@

a {
text-decoration: none;
color: $primary;
color: variables.$primary;
}

article {
Expand Down Expand Up @@ -48,7 +48,7 @@
.entry-content a,
.continue-reading {
text-decoration: none;
color: $body-color;
color: variables.$body-color;
}

.continue-reading {
Expand Down Expand Up @@ -117,7 +117,7 @@
}

.bg-primary {
background-color: $primary;
background-color: variables.$primary;
}

.text-white {
Expand Down
4 changes: 2 additions & 2 deletions src/meta-data/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* Try to style the editor accordion like in the frontend without bootstrap
*/

@import "../../sass/variables";
@use "../../sass/variables";

.wp-block-sunflower-meta-data {

a {
text-decoration: none;
color: $body-color;
color: variables.$body-color;

&.text-danger {
color: #f00;
Expand Down
8 changes: 4 additions & 4 deletions src/next-events/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
* Try to style the editor accordion like in the frontend without bootstrap
*/

@import "../../sass/variables";
@use "../../sass/variables";

.wp-block-sunflower-next-events {

list-style: none;
padding: 0;

a {
a.event-card {
text-decoration: none;
color: $body-color;
color: variables.$body-color;

&.event-card article {
article {
background-color: #fff;
border-radius: 3px;
height: 100%;
Expand Down

0 comments on commit ecb6ca9

Please sign in to comment.