Problem/Motivation
Mercury Editor adds some custom styles which make the thumbnails take up a fraction of the container. ME treats the view as a CSS Grid where Claro expects to use Flex
Steps to reproduce
Using Claro as the administration theme and latest version of Mercury Editor (though this bug has existed previously).
Edit a node using mercury editor with a media library field.
Proposed resolution
Removing:
mercury-dialog .media-library-views-form__rows {
display: grid;
grid-gap: 1rem;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}From mercury_editor/build/css/overrides/claro/media-library.css seems to do the trick
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | mercury_editor-3471287-4.patch | 1.14 KB | ckng |
| #2 | mercury_editor-tiny-media-library-3471287-2.patch | 583 bytes | sbubaron |
| mercury-editor-media-library.png | 32.99 KB | sbubaron |
Issue fork mercury_editor-3471287
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
Comment #2
sbubaron commentedCreated a patch...this is a first time for me so apologies if I didn't do it correctly.
Comment #4
ckngUpdated patch with updated source and build.
Comment #7
krystianbuczak commentedThose CSS rules have been added in the commit https://git.drupalcode.org/project/mercury_editor/-/commit/448d0b632a2ff... as a kind of override of Claro
claro/media_library.themelibrary related somehow with gin_toolbar module. In my opinion Mercury Editor should avoid such dependency assumptions. I would recommend simply remove the override. If this is really something crucial, maybe try to style it conditionally in the context of enabled gin_toolbar module or require dependency to gin_toolbar module inmercury_editor.infofile.Temporary workaround is to stop loading the CSS file by adding below override to *.info file in own, custom admin theme:
Comment #10
sethhill commentedI agree with krystianbuczak in #7. New MR !74 removes the overrides and allows the media library to display as styled by Claro.
I have seen issues when using Mercury with Gin as the admin theme, though. One approach that often resolves these is to explicitly set the Mercury Editor Edit Tray theme to Claro in Mercury Editor settings.
Comment #12
sethhill commented