Skip to content

Commit f3de3e3

Browse files
authored
Merge pull request #2 from builtnorth/dev
Dev
2 parents 18528a2 + 0e976b6 commit f3de3e3

File tree

9 files changed

+132
-7
lines changed

9 files changed

+132
-7
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"./base/reset": "./src/scss/base/_reset.scss",
2121
"./base/accessibility": "./src/scss/base/_accessibility.scss",
2222
"./base/images": "./src/scss/base/_images.scss",
23+
"./base/colors": "./src/scss/base/_colors.scss",
2324
"./components": "./src/scss/components/index.scss",
2425
"./components/buttons": "./src/scss/components/_buttons.scss",
2526
"./components/slider": "./src/scss/components/_slider.scss",

src/scss/base/_colors.scss

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*
2+
Colors
3+
4+
Set up color/contrast pairs.
5+
Now we can use only one color for the background
6+
and the text will be the contrast color.
7+
****************************************************/
8+
9+
/* Base Background */
10+
.has-base-background-color {
11+
color: var(--wp--preset--color--contrast);
12+
13+
a {
14+
color: inherit;
15+
}
16+
}
17+
18+
/* Contrast Background */
19+
.has-contrast-background-color {
20+
color: var(--wp--preset--color--base);
21+
22+
a {
23+
color: inherit;
24+
}
25+
}
26+
27+
/* Primary Background */
28+
.has-primary-background-color {
29+
color: var(--wp--preset--color--primary-contrast);
30+
31+
a {
32+
color: inherit;
33+
}
34+
}
35+
36+
/* Secondary Background */
37+
.has-secondary-background-color {
38+
color: var(--wp--preset--color--secondary-contrast);
39+
40+
a {
41+
color: inherit;
42+
}
43+
}
44+
45+
/* Tertiary Background */
46+
.has-tertiary-background-color {
47+
color: var(--wp--preset--color--tertiary-contrast);
48+
49+
a {
50+
color: inherit;
51+
}
52+
}
53+
54+
/* Neutral One Background */
55+
.has-neutral-1-background-color {
56+
color: var(--wp--preset--color--neutral-1-contrast);
57+
58+
a {
59+
color: inherit;
60+
}
61+
}
62+
63+
/* Neutral Two Background */
64+
.has-neutral-2-background-color {
65+
color: var(--wp--preset--color--neutral-2-contrast);
66+
67+
a {
68+
color: inherit;
69+
}
70+
}
71+
72+
/* Neutral Three Background */
73+
.has-neutral-3-background-color {
74+
color: var(--wp--preset--color--neutral-3-contrast);
75+
76+
a {
77+
color: inherit;
78+
}
79+
}

src/scss/base/_reset.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,16 @@ select {
9191
font: inherit;
9292
}
9393

94+
button {
95+
background: none;
96+
color: inherit;
97+
border: none;
98+
font: inherit;
99+
cursor: pointer;
100+
outline: none;
101+
padding: 0;
102+
}
103+
94104
/* Links
95105
----------------------------------------------------------------*/
96106
:has(:target) {

src/scss/base/index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
@forward "./reset";
33
@forward "./utilities";
44
@forward "./images";
5+
@forward "./colors";

src/scss/components/_buttons.scss

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.wp-block-wp-block-polaris-buttons {
1+
.wp-block-polaris-buttons {
22
display: flex;
33
align-items: center;
44
gap: var(--wp--preset--spacing--40, 1rem);
@@ -101,3 +101,14 @@
101101
}
102102
}
103103
}
104+
105+
/* If no link, remove hover, focus, and pointer events - @todo - test this */
106+
span.wp-block-polaris-button {
107+
pointer-events: none !important;
108+
&:hover {
109+
all: unset;
110+
}
111+
&:focus {
112+
all: unset;
113+
}
114+
}

src/scss/components/_pagintation.scss

Whitespace-only changes.

src/scss/components/index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
@forward "./buttons";
22
@forward "./slider";
3+
@forward "./pagintation";

src/scss/gutenberg/_quirks.scss

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,35 @@
1010

1111
// Allow sticky to work with template parts
1212
.wp-block-template-part {
13-
display: contents;
13+
display: contents;
14+
}
15+
16+
// Allow post content to break out of its container for alignfull blocks
17+
// Need !important to override WordPress inline styles
18+
.wp-block-post-content {
19+
//display: contents !important;
1420
}
1521

1622
/* post tmeplate columns don't span full width */
1723
.wp-block-post-template {
18-
width: 100%;
24+
width: 100%;
25+
}
26+
27+
/* Alignull within template parts within entry-contnet */
28+
.has-global-padding {
29+
.wp-block-template-part {
30+
.alignfull {
31+
margin-left: calc(var(--wp--style--root--padding-left) * -1);
32+
margin-right: calc(var(--wp--style--root--padding-right) * -1);
33+
}
34+
}
35+
}
36+
37+
/* Remove padding on align-full blocks */
38+
:root
39+
:where(.editor-styles-wrapper)
40+
:where(.is-layout-constrained)
41+
> .alignfull,
42+
.alignfull {
43+
margin-block-start: 0;
1944
}

src/scss/layout/_columns.scss

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
.wp-block-polaris-column {
1818
min-width: 4rem;
19-
overflow-wrap: break-word;
20-
word-break: break-word;
2119
width: 100%;
2220
flex-direction: column;
2321
display: flex;
@@ -26,8 +24,7 @@
2624
margin-block-start: 0;
2725

2826
/* Needed for gutenberg - mainly wp-group blocks */
29-
.wp-block-group,
30-
& > * {
27+
.wp-block-group {
3128
width: 100%;
3229
}
3330

0 commit comments

Comments
 (0)