N°9447 - Setup logo is repeating vertically#884
Conversation
|
| Filename | Overview |
|---|---|
| css/backoffice/components/_title.scss | Adds object-fit to base, --must-contain, and --must-cover rules to support <img> elements; --must-zoomout still only sets background-size which has no effect on <img>. |
| templates/base/components/title/layout.html.twig | Switches icon from a <div> with inline background-image (which caused vertical repeating) to a proper <img> element, matching the panel template approach; data-role is incorrectly set to ibo-panel--icon-img. |
| css/setup.css | Compiled/minified CSS updated to include the new object-fit properties for title icon rules; reflects the SCSS changes correctly. |
| tests/manual-visual-tests/Backoffice/RenderAllUiBlocks.php | Expands the title visual test to include an icon-bearing title (class icon and branding logo), replacing the unused level-5 heading example with more representative test cases. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Title component with icon] --> B{Icon rendering}
B -->|Before PR| C["<div> with style='background-image: url(...)'"]
B -->|After PR| D["<img src='...' class='ibo-title--icon-background'>"]
C --> E["No background-repeat: no-repeat set\n→ image tiles/repeats vertically"]
D --> F["Direct image element\n→ no tiling, object-fit: contain applied"]
F --> G{Cover method}
G -->|contain| H["object-fit: contain ✅"]
G -->|cover| I["object-fit: cover ✅"]
G -->|zoomout| J["background-size: 66.67% only\n→ no effect on img ⚠️\n(width/height not set)"]
Comments Outside Diff (1)
-
css/backoffice/components/_title.scss, line 68-70 (link)Missing
<img>sizing fix for--must-zoomoutThe
--must-zoomoutrule still only setsbackground-size: 66.67%, which has no effect on<img>elements. The parallel panel SCSS (_panel.scsslines 201–204) fixes this by usingwidthandheightinstead. Since the twig template now renders an<img>, icons configured with the zoomout method will appear at full size rather than the intended 66.67%, silently losing the zoom-out visual effect.
Reviews (1): Last reviewed commit: "N°9447 - Setup logo is repeating vertica..." | Re-trigger Greptile
|
@greptileai Could you suggest a fix for your P2 issue ? |
|
The P2 issue is the incorrect Here's the fix for line 7 of Tip: You can customize Greptile's behavior for this repo with |
Base information
Symptom (bug) / Objective (enhancement)
Setup logo is repeating vertically in the header
Reproduction procedure (bug)
Cause (bug)
#816 changed how title icons were displayed, but it lacked some rules for regular title and focused only on panel title
Proposed solution (bug and enhancement)
Use the same markup as panel title in regular title, and add rules that focus on img element instead of background
Checklist before requesting a review