Skip to content

Commit c782754

Browse files
committed
Adjust vars, includes and buttons for back and front compatibility
Todo Block paragraph, PullQuote and Separators !
1 parent 93eebc2 commit c782754

7 files changed

Lines changed: 89 additions & 57 deletions

File tree

src/scss/abstract/_positioning.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ $zindex: 1;
66
/**
77
* Spacing
88
*/
9-
$base-spacing: 20px;
9+
$base-spacing: 32px;
1010
$half-base-spacing: $base-spacing / 2;
1111

1212
/**

src/scss/base/_layout.scss

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,4 @@
1818
.container {
1919
padding: 0;
2020
}
21-
22-
.content {
23-
@include span(9);
24-
}
25-
26-
.sidebar {
27-
@include span(3 last);
28-
}
2921
}

src/scss/components/_buttons.scss

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,11 @@
66
display: inline-block;
77
vertical-align: middle;
88
padding: 8px 12px;
9-
background-color: $maingrey;
109
border: 1px solid transparent;
11-
font-family: $customfont-1;
12-
color: $textcolor;
10+
border-radius: 0;
1311
line-height: 1.5;
1412
transition: background-color .3s ease;
15-
16-
@include hover {
17-
background-color: darken($maingrey, 10%);
18-
}
13+
font-family: $customfont-1;
1914
}
2015

2116
// Sizing
@@ -41,10 +36,11 @@
4136

4237
// Coloring
4338
@mixin button--colored($backgroundColor, $color) {
44-
background-color: $backgroundColor;
4539
color: $color;
40+
background-color: $backgroundColor;
4641

4742
@include hover {
43+
color: $color;
4844
background-color: darken($backgroundColor, 10%);
4945
}
5046
}
@@ -155,6 +151,9 @@
155151
@include button--outline($infocolor-2, $infocolor-1);
156152
}
157153
}
154+
&--square {
155+
border-radius: 0;
156+
}
158157
&--round {
159158
@include button--round;
160159
}

src/scss/editor-style.scss

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
/**
2-
* Abstract
3-
*/
1+
// Abstract
42
@import "abstract/url-config";
5-
// Susy 2.2.14
63
@import "~susy/sass/susy";
74
@import "~normalize-scss/sass/normalize/import-now";
85
@import "abstract/positioning";
@@ -12,25 +9,38 @@
129
@import "abstract/fonts";
1310
@import "abstract/box-sizing";
1411
@import "abstract/breakpoints";
12+
@import "abstract/grid";
1513

16-
/**
17-
* Base
18-
*/
14+
// Base
1915
@import "base/text";
2016

21-
/**
22-
* Wordpress
23-
*/
17+
// Components
18+
@import "components/buttons";
19+
20+
// Wordpress
2421
@import "wp/img";
2522
@import "wp/gallery";
2623
@import "wp/wysiwyg";
24+
@import "wp/gutenberg";
2725

28-
/**
29-
* Backend Classic editor container
30-
*/
26+
// Backend Classic editor container
3127
.mce-content-body {
3228
margin: $base-spacing/2;
33-
@include breakpoints(md) {
34-
@include container;
29+
max-width: container();
30+
}
31+
32+
// Backend Gutenberg editor container
33+
.wp-block {
34+
&:not([data-align="full"]) {
35+
max-width: container();
36+
}
37+
&[data-align="wide"] {
38+
max-width: container()*1.5;
39+
}
40+
}
41+
42+
.editor-post-title__block {
43+
.editor-post-title__input {
44+
font-family: $customfont-2;
3545
}
3646
}

src/scss/style.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,11 @@
2727
@import "base/layout";
2828
@import "base/focus";
2929

30-
//Wordpress
31-
@import "wp/wpforms";
32-
@import "wp/img";
33-
@import "wp/gallery";
34-
@import "wp/wysiwyg";
35-
3630
// Components
3731
@import "components/buttons";
3832
@import "components/menu-trigger";
3933
@import "components/menu-fastaccess";
4034
@import "components/card";
41-
@import "components/iframe";
4235
@import "components/messages";
4336

4437
// Patterns
@@ -48,5 +41,12 @@
4841
@import "patterns/hero";
4942
@import "patterns/searchform";
5043

44+
//Wordpress
45+
@import "wp/wpforms";
46+
@import "wp/img";
47+
@import "wp/gallery";
48+
@import "wp/wysiwyg";
49+
@import "wp/gutenberg";
50+
5151
// Pages
5252
@import "pages/print";

src/scss/wp/_gutenberg.scss

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,41 @@
11
.alignwide {
22
@include row--fullwidth;
3-
43
max-width: container() * 1.5;
54
}
65
.alignfull {
76
@include row--fullwidth;
8-
97
max-width: 100vw;
8+
}
9+
10+
// Mains blocks
11+
.wp-block {
12+
$el : &;
13+
14+
// Block Button
15+
&-button {
16+
&__link {
17+
@extend .button;
18+
@extend .button--round;
19+
20+
&:not([class*="has"]) {
21+
@extend .button--primary;
22+
}
23+
}
24+
25+
&.is-style-outline {
26+
#{$el}-button {
27+
&__link {
28+
@extend .button--outline;
29+
}
30+
}
31+
}
32+
33+
&.is-style-squared {
34+
#{$el}-button {
35+
&__link {
36+
@extend .button--square;
37+
}
38+
}
39+
}
40+
}
1041
}

src/scss/wp/_wysiwyg.scss

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
.wysiwyg {
22
@include clearfix;
33

4-
* {
5-
margin-bottom: $base-spacing;
4+
// * {
5+
// margin-bottom: $base-spacing;
66

7-
&:last-child {
8-
margin-bottom: 0;
9-
}
10-
}
7+
// &:last-child {
8+
// margin-bottom: 0;
9+
// }
10+
// }
1111

12-
a {
12+
a:not([class]) {
1313
text-decoration: underline;
1414

1515
@include hover {
1616
text-decoration: none;
1717
}
1818
}
1919

20-
ul {
20+
ul:not([class]) {
2121
list-style: disc inside none;
2222
margin: 0 0 $base-spacing;
2323

@@ -26,24 +26,24 @@
2626
}
2727
}
2828

29-
ol {
29+
ol:not([class]) {
3030
list-style: decimal inside none;
3131
margin: 0 0 $base-spacing;
3232

3333
li {
3434
margin: 0 0 $half-base-spacing;
3535
}
3636
}
37+
3738
img {
3839
@include img__responsive;
39-
}
40-
41-
.alignright,
42-
.alignleft {
43-
max-width: 50%;
40+
&.alignright,
41+
&.alignleft {
42+
max-width: 50%;
4443

45-
@include breakpoints(sm) {
46-
max-width: 100%;
44+
@include breakpoints(sm) {
45+
max-width: 100%;
46+
}
4747
}
4848
}
4949
}

0 commit comments

Comments
 (0)