Skip to content

Commit 4fb2a9a

Browse files
authored
Merge pull request #265 from moderntribe/feature/theme-enhancements
Feature/theme enhancements
2 parents c8ad079 + 6167fec commit 4fb2a9a

File tree

8 files changed

+43
-1
lines changed

8 files changed

+43
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format
44
on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Each changelog entry gets prefixed with the category of the
55
item (Added, Changed, Depreciated, Removed, Fixed, Security).
66

7+
## [2025.11]
8+
9+
- Updated: Color themes now include a padding spacer `--group-themed-default-padding` to ensure content has default inner spacing. This can be overwritten with the block gap settings.
10+
- Added: Custom media query `--mq-allow-animations` checks for `no-preference` value for better a11y on animations.
11+
712
## [2025.08]
813

914
- Updated: pre-commit hooks now no longer run if the commit does not include files related to the hook. Pre-commit hooks now also include FE linting.

wp-content/themes/core/assets/pcss/media-queries/_variables.pcss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@
2525

2626
@custom-media --has-hover (hover: hover);
2727

28+
/* -------------------------------------------------------------------------
29+
*
30+
* Animations Custom Media
31+
*
32+
* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion
33+
* - use this to apply a CSS animation. Leave no animation by default and then
34+
* apply this MQ to add your animation
35+
* ------------------------------------------------------------------------- */
36+
@custom-media --mq-allow-animations (prefers-reduced-motion: no-preference);
37+
2838
/* -------------------------------------------------------------------------
2939
* WP Breakpoints
3040
* https://github.com/WordPress/gutenberg/blob/trunk/packages/base-styles/_breakpoints.scss

wp-content/themes/core/blocks/core/details/style.pcss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@
5555
* Add animation to the content
5656
*/
5757
&[open] summary ~ * {
58-
animation: sweep 0.3s ease-in-out;
58+
59+
@media (--mq-allow-animations) {
60+
animation: sweep 0.3s ease-in-out;
61+
}
5962
}
6063
}
6164

wp-content/themes/core/blocks/core/group/style.pcss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22
* Styles specific to this block
33
*/
44

5+
:root {
6+
--group-themed-default-padding: var(--spacer-30);
7+
}
8+
59
.wp-block-group {
610

711
/* CASE: Has Transparent Background */
812
&.has-transparent-background {
913
background-color: transparent !important;
1014
}
15+
16+
/**
17+
* CASE: Ensures that full width blocks share the same global
18+
* root padding for left a right. allows content to
19+
*/
20+
&.alignfull {
21+
padding: var(--group-themed-default-padding) var(--wp--style--root--padding-left);
22+
}
1123
}

wp-content/themes/core/styles/blocks/group/10-white.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
}
4848
}
4949
}
50+
},
51+
"spacing": {
52+
"padding": "var(--group-themed-default-padding)"
5053
}
5154
}
5255
}

wp-content/themes/core/styles/blocks/group/20-light.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
}
4848
}
4949
}
50+
},
51+
"spacing": {
52+
"padding": "var(--group-themed-default-padding)"
5053
}
5154
}
5255
}

wp-content/themes/core/styles/blocks/group/30-dark.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
}
4848
}
4949
}
50+
},
51+
"spacing": {
52+
"padding": "var(--group-themed-default-padding)"
5053
}
5154
}
5255
}

wp-content/themes/core/styles/blocks/group/40-brand.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
}
4848
}
4949
}
50+
},
51+
"spacing": {
52+
"padding": "var(--group-themed-default-padding)"
5053
}
5154
}
5255
}

0 commit comments

Comments
 (0)