Currently, Commerce modules utilize unique layout classes for similar functionality, leading to redundant CSS code.
For example, the main region:
layout-region-product-main, layout-region-order-main, layout-region-promotion-main and similar.

To streamline development and enhance maintainability, we should introduce a generic layout class layout-region-commerce-main, layout-region-commerce-secondary and layout-region-commerce-footer that can be shared across modules and use just one CSS/library.

Issue fork commerce-3422636

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

majmunbog created an issue. See original summary.

majmunbog’s picture

Status: Active » Needs review

jsacksick’s picture

Status: Needs review » Fixed

Merged, thank you Ivan!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

andyg5000’s picture

Hey Guys, Thanks for the work on this. This requires an update for anyone that's customized the admin order template. May want to put something in the release notes about that.

jsacksick’s picture

Perhaps removing the libraries was too brutal... Did that cause you any trouble? But I guess even keeping the files would have been problematic, since the libraries.yml definition was removed right?

andyg5000’s picture

It just broke the column layout on our admin order page. Not a big deal imo, but end users did have a moment of panic. Just a heads up to check custom templates in the release notes should be fine I think.

andyg5000’s picture

I've had complaints about `--commerce--layout-content-max-width` too. Not sure why that's constrained to 52rem. It affects the column layout of all the commerce pages like product edit form and order edit form.

jsacksick’s picture

The Claro approach was copied, there was a followup issue addressed as the width got reduced on the order view page accidentally too. I'm also not a huge fan of the restricted width for the edit forms, but I guess we just followed Claro's lead.

jsacksick’s picture