From b7a311ced96e211174dbe199c830f33bff91387e Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 18 Nov 2022 14:02:13 +0000 Subject: [PATCH] Bug 28235: Correct CSS governing max width of custom cover images Images shown in the OPAC and staff interface when the OPACCustomCoverImages and CustomCoverImages preferences are enabled should be getting a max-width set in the current CSS, but the order of the declarations is preventing the correct specificity. This patch moves the CSS to the correct place in each file so that the max-width is applied. To test, apply the patch and rebuild both the staff and OPAC CSS. If you get an error during the build process you may need to run 'yarn install.' - Go to Administration -> System preferences, and enable the OPACCustomCoverImages and CustomCoverImages preferences. - If you're testing with the default test database you can set the CustomCoverImagesURL preference to https://static.myacpl.org/public/covers/{normalized_isbn}.jpg - Perform a catalog search in both OPAC and staff client limiting by itemtype = 'Book'. - The search results in both interface should show several covers supplied from the external URL. - In the staff client, these images should be limited to 140px wide even if the source image is larger. - In the OPAC, view the detail page for one of the results with cover images. The image shown on the detail page should be constrained to 140px wide even if the source image is larger. Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../intranet-tmpl/prog/css/src/staff-global.scss | 12 ++++++------ koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss index 9b61d29ab3..3140444640 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -2072,12 +2072,6 @@ li { text-align: center; } -.custom_cover_image { - img { - max-width: 140px; - } -} - #biblio-cover-slider { border: 1px solid #bfd9b9; border-radius: 3px; @@ -2157,6 +2151,12 @@ td { } } +.custom_cover_image { + img { + max-width: 140px; + } +} + .cover-nav { display: inline-block; padding: 3px 4px; diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss index 63434d3cbf..8af3afa2ed 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss +++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss @@ -713,12 +713,6 @@ th { } } -.custom_cover_image { - img { - max-width: 140px; - } -} - #biblio-cover-slider { background-color: #FFF; border: 1px solid #B9D8D9; @@ -755,6 +749,12 @@ th { } } +.custom_cover_image { + img { + max-width: 140px; + } +} + .cover-nav { display: inline-block; padding: 3px 4px; -- 2.39.5