Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme: Add workaround for unsupported CSS4 selectors #111

Merged
merged 4 commits into from
Sep 1, 2022
31 changes: 31 additions & 0 deletions source/wp-content/themes/wporg-main-2022/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,34 @@
padding-left: 0;
margin-bottom: 0;
}


/*
* Workaround for Gutenberg CSS4 selectors on older browsers.
*
* @link https://github.com/WordPress/gutenberg/issues/43723.
*
* Reproducing gutenberg_get_layout_style() isn't practical, so this just hardcodes the needed values.
*
* Remove this when the above issue is fixed in a stable release.
*/
.wp-block-group[class*="wp-container-"],
iandunn marked this conversation as resolved.
Show resolved Hide resolved
.wp-block-columns[class*="wp-container-"],
.wp-block-group[class*="wp-container-"] > *,
.wp-block-columns[class*="wp-container-"] > *,
[class*="wp-container-"] .wp-block-buttons {
margin-left: auto !important;
margin-right: auto !important;
}

.wp-block-group[class*="wp-container-"].entry-content,
.wp-block-group[class*="wp-container-"][class*="is-content-justification-"] > * {
margin-left: unset !important;
margin-right: unset !important;
}

#benefits .wp-block-group[class*="wp-container-"],
#community .wp-block-group[class*="wp-container-"],
iandunn marked this conversation as resolved.
Show resolved Hide resolved
#editor .wp-block-group[class*="wp-container-"] {
max-width: 520px;
}