- Issue created by @karlshea
- Status changed to Postponed: needs info
over 1 year ago 9:45am 6 July 2023 - π¨πSwitzerland saschaeggi Zurich
@KarlShea are you using gin_lb? If so we might want to move it there.
- πͺπΈSpain idiaz.roncero Madrid
+1 to this, not using gin_lb and seeing this problem after updating to Drupal 10 because of the missing variables.
Gin is used, but the source of the problem is Claro as Gin doesn't touch the width and height of the element.
Setting the variables --jui-dialog-close-button-size --jui-dialog-close-button-size solves the issue.
Screenshot of the CSS applied to the element.
- πͺπΈSpain idiaz.roncero Madrid
The surprising thing is that I can see
/core/themes/claro/css/base/variables.css
loaded on my theme ΒΏΒΏ?? - πͺπΈSpain idiaz.roncero Madrid
SO.. i did a little investigation and the following is happening:
- When you load layout builder, you are using the front-end theme so no Claro assets are present on the page (
claro/global-styling
library, which includes thevariables.css
file) - When you load the modal, the Gin theme kicks in and via AJAX the assets are loaded: now the
variables.css
file is present - ...but, somehow (maybe because of dynamically loading CSS via AJAX?) the new CSS variables are not applied to the page: they all appear as undefined
If this is confirmed, it might be a major bug as CSS is moving towards variables and then, any AJAX loading of CSS assets that involves adding CSS variables might fail.
- When you load layout builder, you are using the front-end theme so no Claro assets are present on the page (
- πͺπΈSpain idiaz.roncero Madrid
@KarlShea are you using layout_builder_iframe_modal
If so, I think that's the culprit. The CSS is attached, but inside an iframe (while the dialog topbar, where the button is in, remains outside the iframe). That's why the CSS variables can't access the outer scope.
- πͺπΈSpain idiaz.roncero Madrid
My bad, this is independent of the use of layout_builder_iframe_modal.
It seems related to the fact that Layout Builder isn't using the admin, but the public theme, so Claro+Gin styling is not applied there.
-
saschaeggi β
committed b7530601 on 8.x-3.x
Issue #3372697 by saschaeggi: Dialog close icon with Layout Builder in...
-
saschaeggi β
committed b7530601 on 8.x-3.x
- Status changed to Fixed
over 1 year ago 10:42am 17 September 2023 Automatically closed - issue fixed for 2 weeks with no activity.