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

#5097: Maywood: Fix image alignment #6075

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from
Open

#5097: Maywood: Fix image alignment #6075

wants to merge 3 commits into from

Conversation

bobmatyas
Copy link
Contributor

Fixes image alignment in Maywood to bring frontend into parity with editor options

Changes proposed in this Pull Request:

Before


Editor:

Screenshot on 2022-06-07 at 09-25-38

Frontend:

Screenshot on 2022-06-07 at 09-25-59

After


Editor:

Screenshot on 2022-06-07 at 09-25-38

Frontend:

Screenshot on 2022-06-07 at 09-26-37

Related issue(s):

Fixes #5097

@bobmatyas bobmatyas requested a review from a team June 7, 2022 13:54
Copy link
Contributor

@pbking pbking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maywood leverages SASS. Thus this change would require that the source file be changed and then recompile, but that source is actually in varia.

Thus deleting this CSS would effect ALL Varia themes. Which perhaps is desirable based on the issue described. But changing the CSS here would just get overwritten the next time the SASS was recompiled.

@bobmatyas
Copy link
Contributor Author

Thanks for the feedback here.

I made a change in Varia to reflect this (built and tested) and rebuilt the child themes (npm run children). Based on this comment it seems like the change should happen in Varia: #5097 (comment)

I tested on Maywood and it fixed the issue. I also checked in Hever and Stratford and had no adverse effects.

Varia

Before

Screenshot on 2022-06-10 at 14-55-52

After

Screenshot on 2022-06-10 at 15-13-35

Maywood

Before

Screenshot on 2022-06-10 at 14-55-15

After

Screenshot on 2022-06-10 at 14-59-51

Copy link
Contributor

@pbking pbking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like the right change to the SASS file to make the change you want. However it will still need to be compiled and the result of that compilation committed.

That's going to make for quite a few changed files, but that's how Varia and family works.

Run npm run build in the varia folder to build the CSS for Varia itself. Then (also in the varia folder) run ./rebuild-child-themes.sh (or npm run children which just calls that bash script).

The result with be a changed style.css, style-rtl.css and possibly a changed package-lock.json file for each varia theme which also needs to be committed to the PR.

Of course this means that the resulting behavior will be changed in all of these themes. Which could be argued is correct, but it's also a change and has the potential to change the layout of a lot of people's sites. Something to carefully consider when making the fix. (One person's 'fix' is another person's 'breakage'.)

@bobmatyas
Copy link
Contributor Author

I can build the child themes and commit, but maybe this needs more discussion by the Theme team as to whether or not this should be fixed?

It seems like it is indeed not working properly (prior to the fix), but I am somewhat unsure whether or not it now makes sense to fix knowing that it will change so many themes. Theoretically, users shouldn't be relying on the auto-aligning since the editor was working properly and if they wanted center aligning, they would have had to manually do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple themes: Image blocks are centered by default, not left aligned
2 participants