Make WordPress Core

Changeset 54170


Ignore:
Timestamp:
09/14/2022 10:31:19 PM (2 years ago)
Author:
audrasjb
Message:

Twenty Twenty-One: Remove WooCommerce related CSS selectors.

The selectors for Twenty Twenty-One's default max-width have used the .woocommerce class since the theme's initial commit. This changeset removes all WooCommerce CSS selector from the theme, as they would need to be supported forever. The change was tested with WooCommerce installed and no issues were raised.

Props sabernhardt, audrasjb, davidbaumwald, tahmidulkarim, mukesh27.
Fixes #56366.

Location:
trunk/src/wp-content/themes/twentytwentyone
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwentyone/assets/css/ie.css

    r54103 r54170  
    517517}
    518518
    519 .entry-content > *:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator):not(.woocommerce) {
     519.entry-content > *:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator) {
    520520    max-width: calc(100vw - 30px);
    521521    margin-left: auto;
     
    524524@media only screen and (min-width: 482px) {
    525525
    526     .entry-content > *:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator):not(.woocommerce) {
     526    .entry-content > *:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator) {
    527527        max-width: min(calc(100vw - 100px), 610px);
    528528    }
     
    530530@media only screen and (min-width: 822px) {
    531531
    532     .entry-content > *:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator):not(.woocommerce) {
     532    .entry-content > *:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator) {
    533533        max-width: min(calc(100vw - 200px), 610px);
    534534    }
    535535}
    536536
    537 *[class*=inner-container] > *:not(.entry-content):not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator):not(.woocommerce) {
     537*[class*=inner-container] > *:not(.entry-content):not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator) {
    538538    max-width: calc(100vw - 30px);
    539539    margin-left: auto;
     
    542542@media only screen and (min-width: 482px) {
    543543
    544     *[class*=inner-container] > *:not(.entry-content):not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator):not(.woocommerce) {
     544    *[class*=inner-container] > *:not(.entry-content):not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator) {
    545545        max-width: min(calc(100vw - 100px), 610px);
    546546    }
     
    548548@media only screen and (min-width: 822px) {
    549549
    550     *[class*=inner-container] > *:not(.entry-content):not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator):not(.woocommerce) {
     550    *[class*=inner-container] > *:not(.entry-content):not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator) {
    551551        max-width: min(calc(100vw - 200px), 610px);
    552552    }
  • trunk/src/wp-content/themes/twentytwentyone/assets/sass/05-blocks/utilities/_style.scss

    r49574 r54170  
    44 * These selectors set the default max width for content appearing inside a post or page.
    55 */
    6 .entry-content > *:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator):not(.woocommerce),
    7 *[class*="inner-container"] > *:not(.entry-content):not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator):not(.woocommerce) {
     6.entry-content > *:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator),
     7*[class*="inner-container"] > *:not(.entry-content):not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator) {
    88    @extend %responsive-aligndefault-width;
    99}
  • trunk/src/wp-content/themes/twentytwentyone/style-rtl.css

    r54103 r54170  
    694694.post-thumbnail,
    695695.entry-content .wp-audio-shortcode,
    696 .entry-content > *:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator):not(.woocommerce),
    697 *[class*=inner-container] > *:not(.entry-content):not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator):not(.woocommerce),
     696.entry-content > *:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator),
     697*[class*=inner-container] > *:not(.entry-content):not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator),
    698698.default-max-width {
    699699    max-width: var(--responsive--aligndefault-width);
  • trunk/src/wp-content/themes/twentytwentyone/style.css

    r54103 r54170  
    694694.post-thumbnail,
    695695.entry-content .wp-audio-shortcode,
    696 .entry-content > *:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator):not(.woocommerce),
    697 *[class*=inner-container] > *:not(.entry-content):not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator):not(.woocommerce),
     696.entry-content > *:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator),
     697*[class*=inner-container] > *:not(.entry-content):not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator),
    698698.default-max-width {
    699699    max-width: var(--responsive--aligndefault-width);
Note: See TracChangeset for help on using the changeset viewer.