Skip to content

Commit ab9e208

Browse files
committed
fix: Prevent translation loading spinner from showing on page load
The CSS rule `display: flex` was overriding the `hidden` attribute on the loading indicator element. Changed to use `:not([hidden])` selector so the flex layout only applies when the element is not hidden.
1 parent 7af7ae9 commit ab9e208

7 files changed

Lines changed: 7 additions & 1211 deletions

File tree

cloudformation/scenarios/localgov-drupal/drupal/web/modules/custom/ndx_aws_ai/css/content-translation.css

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,19 @@
6060
}
6161

6262
.translation-widget__loading {
63-
display: flex;
64-
align-items: center;
65-
gap: 10px;
6663
margin-top: 15px;
6764
padding: 10px;
6865
background: #fff;
6966
border: 1px solid #b1b4b6;
7067
}
7168

69+
/* Only show as flex when not hidden - display: flex would override [hidden] attribute */
70+
.translation-widget__loading:not([hidden]) {
71+
display: flex;
72+
align-items: center;
73+
gap: 10px;
74+
}
75+
7276
.translation-loading-spinner {
7377
display: inline-block;
7478
width: 20px;

0 commit comments

Comments
 (0)