Claro theme overriding the position of the close button on dialogs

Created on 11 March 2025, 4 months ago

Claro theme seems to override the position of the close button on dialogs. When using layout_builder_iframe_modal in layout builder the close button on the dialog is not visible.

If I override these two styles set by the Claro theme, it displays correctly.

.ui-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close {
-  inline-size: var(--jui-dialog-close-button-size);</del>
+  inline-size: 2rem;
}
.ui-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close .ui-icon.ui-icon-closethick {
-  transform: translate(-50%, -50%);
+  transform: none;
}
๐Ÿ› Bug report
Status

Active

Version

4.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States jphelan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @jphelan
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States jphelan
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom niklp Nottingham

    Seeing something similar manifest in webform dialogs also.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vasantha deepika Coimbatore
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vasantha deepika Coimbatore

    Could you please provide the steps to reproduce it? This will help us understand the context.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States jphelan
    • Install layout_builder_iframe_modal
    • Enabled layout builder on a content type
    • Create a node and the edit the layout
    • add a section and then add a block
    • Select "Create content block"
    • Select the basic content block and it should open in a modal
    • You should notice that the close button, while present, is not visible
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vasantha deepika Coimbatore
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vasantha deepika Coimbatore

    Hi @jphelan, I couldn't reproduce the issue on my end, i tried with the versions mentioned below

    Gin theme version: 4.0.6
    Layout Builder iFrame Modal version: 1.3.6

    Could you please let me know which version of the Layout Builder iFrame Modal you're using?

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States jphelan

    Drupal Version - 11.1.5
    Gin 4.0.6
    layout_builder_iframe_modal 1.3.6

    Attached my gin theme settings.

    Odd, you don't see the
    core/themes/claro/css/components/dialog.css
    styles loading and overriding the gin styles?
    themes/contrib/gin/dist/css/components/dialog.css

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sandip

    Yes @jphelan, this issue is reproducable and the css is coming from claro which is overriding gin styles. i am attaching SS for reference.
    I am working on it.

  • Pipeline finished with Success
    2 months ago
    #483719
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sandip

    Hi @jphelan,

    I have resolved the issue. The root cause was related to CSS specificity โ€” Claro's CSS was more specific than Gin's. I adjusted Ginโ€™s dialog CSS to match the specificity of Claro's, and that resolved the overriding problem. No changes to Gin's code were necessary beyond that.

    Please let me know if you need any further changes.

    Thank you!

  • Status changed to Needs review about 2 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia snehal-chibde

    hello , I have tested this issue on Drupal Version 11.1.6, and it appears that the issue is not replicated in this version. It seems the problem has been resolved in the latest version. I would recommend upgrading to 11.1.6 for anyone experiencing this issue.
    Added screenshot for reference.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sandip

    Hi @snehal-chibde you are supposed to test this issue in Gin. The image you have provided it seems claro theme.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia snehal-chibde

    hello @sandip I have checked this on Gin theme and its not replicated.
    Added screenshot for reference.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sandip

    @snehal-chibde, but i recheck this on latest 11.x version of Drupal again but this issue still persists. Lets wait for other reviewers if they also able to reproduce it.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia divya.sejekan

    I have followed the steps , But not able to reproduce this issue . I have enabled gin theme
    Im using :
    Drupal - 11.1.8
    Gin 4.0.6
    layout_builder_iframe_modal 1.3.6

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States aadownie

    I am seeing this issue as well, but with the Layout Builder Browser module and Gin version 5.
    Drupal 11.2.2
    layout_builder_browser 8.x-1.8
    Gin 5.0.2

    The provided style overrides do work for me, but need additional specificity to override Claro.

Production build 0.71.5 2024