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

$ExtraClass in LeftAndMain_ViewModeSelector.ss causing CMS preview button to render full width #1324

Closed
rspcactucker opened this issue Jul 8, 2022 · 2 comments

Comments

@rspcactucker
Copy link

rspcactucker commented Jul 8, 2022

I believe this PR has created a problem by introducing $ExtraClass in LeftAndMain_ViewModeSelector.ss.

Because $ExtraClass is not always being passed in via include statements, the template parser will then look further up in scope and obtain $ExtraClass from parent objects. CMSMain_EditForm.ss is doing this from silverstripe/cms, and as such, the view mode selector receives the flexbox-area-grow class.

This has the following result in the CMS:

Before PR merge:

image

After PR merge:

image

Looks a bit naff. 😉

PRs

@GuySartorelli
Copy link
Member

GuySartorelli commented Jul 11, 2022

Good spotting. Would you be willing to create a PR to fix this? If so I'd be happy to review it.
I think the cleanest fix would be to change $ExtraClass in that template to something more specific to its purpose, such as $LeftMarginClass

@GuySartorelli
Copy link
Member

Fixed by silverstripe/silverstripe-cms#2787

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

Successfully merging a pull request may close this issue.

3 participants