Skip to content

Commit 2f803c9

Browse files
committed
Abstand der Operations-Icons in .tl_content_right wiederherstellen
Contao 5.7 hat .tl_content_right zu einem Flex-Container gemacht; bis Contao 5.3 war es ein gewoehnlicher Block mit "text-align: right". Die Operations- Links gibt das Markup durch Leerzeichen getrennt aus - in einem Flex-Container verwirft der Browser diese Whitespace-Textknoten, wodurch die Icons unmittelbar aneinander klebten. Contaos eigene Regel setzt nur "margin-left: 1px" auf img und button. Das greift bei uns nicht, weil das Bild *innerhalb* des Links sitzt und der Abstand damit im Link statt zwischen den Links landet. Der Container bekommt daher "gap: 3px". Der Wert ist von Contao uebernommen: dort enthaelt .tl_content_right ein einzelnes ".operations"-Menue, dessen Liste mit demselben gap arbeitet. Nachgemessen im Backend - Contao 3px, wir vorher 0px, jetzt 3px. Die Regel steht in generalDriver.css, die ausschliesslich ueber BaseView geladen wird und damit nur auf dc-general-Ansichten wirkt. Contaos eigene Listenansichten bleiben unberuehrt.
1 parent c620a8f commit 2f803c9

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/Resources/public/css/generalDriver.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,3 +232,17 @@
232232
position : static;
233233
flex-shrink: 0;
234234
}
235+
236+
/* Contao 5.7 turned ".tl_content_right" into a flex container - up to 5.3 it was a plain block
237+
with "text-align: right". Our markup separates the operation links by a space, and a flex
238+
container drops those whitespace text nodes, so the icons ended up glued together. Contao's
239+
own rule only sets "margin-left: 1px" on img and button, which does not help here: our image
240+
sits *inside* the link, so the offset lands within the link instead of between them.
241+
242+
The value follows Contao: there ".tl_content_right" holds a single ".operations" menu whose
243+
list uses "gap: 3px" (themes/flexible/styles/layout/list-view.pcss). We put the links into
244+
the container directly and use the same spacing, so our views do not look different next to
245+
Contao's own ones. */
246+
.tl_content_right {
247+
gap : 3px;
248+
}

0 commit comments

Comments
 (0)