Removed double span elements in buttons #2501
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
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?