Skip to content

Commit e121eec

Browse files
committed
update version, fix styles in editor
1 parent ace2a50 commit e121eec

File tree

2 files changed

+39
-30
lines changed

2 files changed

+39
-30
lines changed

src/plugins/theme-block-style-inheritance/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ function register_block_style_inheritance() {
4141
}
4242

4343
/**
44-
* When upgrading to v3.15.4 and above, set option to true for backward compatibility
44+
* When upgrading to v3.15.3 and above, set option to true for backward compatibility
4545
* so that for old users, existing stackable blocks won't inherit the styles from theme.json
4646
* unless they change it in the settings.
4747
*/
4848
function block_style_inheritance_set_default( $old_version, $new_version ) {
49-
if ( ! empty( $old_version ) && version_compare( $old_version, "3.15.4", "<" ) ) {
49+
if ( ! empty( $old_version ) && version_compare( $old_version, "3.15.3", "<=" ) ) {
5050
if ( ! get_option( 'stackable_disable_block_style_inheritance' ) ) {
5151
update_option( 'stackable_disable_block_style_inheritance', 'true' );
5252
}

src/styles/editor-block-transitions.scss

Lines changed: 37 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,43 @@
1+
$stk-anim-selectors:
2+
"[data-type^='stackable/']",
3+
".stk-block",
4+
".stk-container",
5+
".stk-container-padding",
6+
".stk-img-wrapper", // Images.
7+
".stk-img-wrapper img", // Images.
8+
".stk-block-heading__top-line",
9+
".stk-block-heading__bottom-line",
10+
".stk-block-posts__item-hide", // For posts transitions
11+
".stk-block-posts__title > a", // For posts title
12+
".stk-button", // Buttons
13+
".stk-button__inner-text", // Button text
14+
".stk-block li", // For icon list texts
15+
".stk-block p",
16+
".stk-block h1",
17+
".stk-block h2",
18+
".stk-block h3",
19+
".stk-block h4",
20+
".stk-block h5",
21+
".stk-block h6";
22+
23+
$stk-anim-selectors-pseudo:
24+
".stk--has-background-overlay::before", // Image background overlays
25+
".stk-block .stk-button::before", // For button animations
26+
".stk-block .stk-button::after", // For button animations
27+
".stk-img-resizer-wrapper::after", // Image block overlay.
28+
".stk-img-resizer-wrapper::before", // Image block hover ovelay.
29+
".stk-block li::marker", // For icon list marker
30+
".stk-block-tabs__tab"; // Tabs block
31+
32+
133
.editor-styles-wrapper {
2-
:is(
3-
[data-type^="stackable/"],
4-
.stk-block,
5-
.stk-container,
6-
.stk-container-padding,
7-
.stk-img-wrapper, // Images.
8-
.stk-img-wrapper img, // Images.
9-
.stk-block-heading__top-line,
10-
.stk-block-heading__bottom-line,
11-
.stk-block-posts__item-hide, // For posts transitions
12-
.stk-block-posts__title > a, // For posts title
13-
.stk-button, // Buttons
14-
.stk-button__inner-text, // Button text
15-
.stk-block li, // For icon list texts
16-
.stk-block p,
17-
.stk-block h1,
18-
.stk-block h2,
19-
.stk-block h3,
20-
.stk-block h4,
21-
.stk-block h5,
22-
.stk-block h6),
34+
:is(#{$stk-anim-selectors}),
2335
// These are outside :is() since pseudo elements won't compile correctly.
24-
.stk--has-background-overlay::before, // Image background overlays
25-
.stk-block .stk-button::before, // For button animations
26-
.stk-block .stk-button::after, // For button animations
27-
.stk-img-resizer-wrapper::after, // Image block overlay.
28-
.stk-img-resizer-wrapper::before, // Image block hover ovelay.
29-
.stk-block li::marker, // For icon list marker
30-
.stk-block-tabs__tab { // Tabs block
36+
#{$stk-anim-selectors-pseudo} { // Tabs block
3137
transition: all var(--stk-transition-duration, 0.12s) cubic-bezier(0.45, 0.05, 0.55, 0.95), margin 0s, flex 0s, max-width 0s, visibility 0s; // Don't include flex & max-width since column widths would animate.
38+
}
39+
:where(#{$stk-anim-selectors}),
40+
#{$stk-anim-selectors-pseudo} {
3241
border-width: 1px;
3342
border-style: none;
3443
}

0 commit comments

Comments
 (0)