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

Removed double span elements in buttons #2501

Closed
wants to merge 2 commits into from

Conversation

fballiano
Copy link
Contributor

The OM base template has a very old HTML structure, with a lot of (now) useless wrappers that (at the creation time) were necessary because CSS was not so powerful.

Now the situation is very different, CSS is very powerfull, all those divs and spans are no longer necessary but not only, they're actually a problem because they make the DOM very big and google hates a big DOM, so it's our duty to provide an HTML that's basic (as in the "base" theme) and not overbloated.

This PR removed the double span elements that are present in every button, they were used to center the text in the button but they're now totally unnecessary.

How to test

  • check out this PR
  • be sure you have the rwd theme selected
  • navigate the openmage installation and see everything works

Questions

Why are we checking rwd if we modified base? because base doesn't come with CSS and it's important that we don't brake rwd theme with this PR. This doesn't seem to happen.

Why don't we remove the double span from the rwd theme too? I guess it would break a lot more custom themes and it's not totally necessary, rwd it's our default theme and it could stay a little "opinionated" but those elements do not belong to the base theme.

Impacts on custom themes? This is hard to know... all themes that inherits from rwd should be fine but if they inherit directly from base... they will probably have some problems. What do we do with that?

@github-actions github-actions bot added Component: Catalog Relates to Mage_Catalog Component: CatalogSearch Relates to Mage_CatalogSearch Component: Checkout Relates to Mage_Checkout Component: Contacts Relates to Mage_Contacts Component: Customer Relates to Mage_Customer Component: Newsletter Relates to Mage_Newsletter Component: Oauth Relates to Mage_Oauth Component: Page Relates to Mage_Page Component: Paygate Relates to Mage_Paygate Component: PayPal Relates to Mage_Paypal Component: Persistant Relates to Mage_Persistant Component: Poll Relates to Mage_Poll Component: Reports Relates to Mage_Reports Component: Review Relates to Mage_Review Component: Sales Relates to Mage_Sales Component: Sendfriend Relates to Mage_Sendfriend Component: Shipping Relates to Mage_Shipping Component: Tag Relates to Mage_Tag Component: Wishlist Relates to Mage_Wishlist Template : base Relates to base template labels Aug 27, 2022
@fballiano fballiano changed the base branch from 1.9.4.x to 20.0 March 29, 2023 14:58
@fballiano fballiano dismissed FredericMartinez’s stale review March 29, 2023 14:58

The base branch was changed.

@fballiano fballiano changed the base branch from 20.0 to 1.9.4.x March 29, 2023 14:58
@fballiano
Copy link
Contributor Author

I'll have to rewrite this on branch 20 so I'll close it ATM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Catalog Relates to Mage_Catalog Component: CatalogSearch Relates to Mage_CatalogSearch Component: Checkout Relates to Mage_Checkout Component: Contacts Relates to Mage_Contacts Component: Customer Relates to Mage_Customer Component: Newsletter Relates to Mage_Newsletter Component: Oauth Relates to Mage_Oauth Component: Page Relates to Mage_Page Component: Paygate Relates to Mage_Paygate Component: PayPal Relates to Mage_Paypal Component: Persistant Relates to Mage_Persistant Component: Poll Relates to Mage_Poll Component: Reports Relates to Mage_Reports Component: Review Relates to Mage_Review Component: Sales Relates to Mage_Sales Component: Sendfriend Relates to Mage_Sendfriend Component: Shipping Relates to Mage_Shipping Component: Tag Relates to Mage_Tag Component: Wishlist Relates to Mage_Wishlist Template : base Relates to base template
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants