From 5a093813ac86571d9a87d4d08ae152fb0b82501a Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 9 Jan 2023 10:52:48 -0700 Subject: [PATCH] Fix toolbar button icon alignment Icons were shifted to the left due to padding & label --- api/templates/default/etemplate2.css | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/api/templates/default/etemplate2.css b/api/templates/default/etemplate2.css index 3fa4c31511..3fd3a24c70 100644 --- a/api/templates/default/etemplate2.css +++ b/api/templates/default/etemplate2.css @@ -2773,9 +2773,24 @@ table.egwGridView_outer thead tr th.noResize:hover { width: auto; } -.et2_toolbar .et2_toolbar_actionlist et2-button.et2_toolbar_onlyCaption::part(label) { - position: absolute; - left: -999px; +/* Hide label visually */ +.et2_toolbar et2-button:not(.et2_toolbar_hasCaption)::part(base) { + justify-content: center; + padding-inline-start: 0; +} + +.et2_toolbar et2-button:not(.et2_toolbar_hasCaption)::part(label) { + position: absolute; + top: 100%; +} + +.et2_toolbar et2-button:not(.et2_toolbar_hasCaption)::part(prefix) { + padding: 0; +} + +.et2_toolbar et2-button.et2_toolbar_onlyCaption::part(label) { + position: absolute; + left: -999px; } div.et2_toolbar.ui-widget-header {