Skip to content

Commit ea948df

Browse files
authored
Merge pull request #3380 from AlchemyCMS/dialog-close-button
Fix Dialog close button styles
2 parents ebc2af5 + 3d6ff8d commit ea948df

7 files changed

Lines changed: 41 additions & 16 deletions

File tree

app/assets/builds/alchemy/admin.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/builds/tinymce/skins/ui/alchemy-dark/skin.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/builds/tinymce/skins/ui/alchemy/skin.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/javascript/alchemy_admin/dialog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ export class Dialog {
233233
this.dialog_header = $('<div class="alchemy-dialog-header" />')
234234
this.dialog_title = $('<div class="alchemy-dialog-title" />')
235235
this.close_button = $(
236-
'<a class="alchemy-dialog-close"><alchemy-icon name="close"></alchemy-icon></a>'
236+
'<button class="alchemy-dialog-close"><alchemy-icon name="close"></alchemy-icon></button>'
237237
)
238238
this.dialog_title.text(this.options.title)
239239
this.dialog_header.append(this.dialog_title)

app/stylesheets/alchemy/admin/dialogs.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,23 @@
156156
}
157157
}
158158

159+
.alchemy-dialog-close {
160+
display: inline-flex;
161+
width: var(--spacing-6);
162+
height: var(--spacing-6);
163+
justify-content: center;
164+
align-items: center;
165+
background-color: transparent;
166+
border-color: transparent;
167+
border-radius: var(--border-radius_medium);
168+
color: var(--color-white);
169+
padding: 0;
170+
171+
&:hover {
172+
background-color: var(--color-blue_medium);
173+
}
174+
}
175+
159176
.alchemy-dialog-body {
160177
position: relative;
161178
color: var(--text-color);

app/stylesheets/tinymce/skins/ui/alchemy-dark/skin.scss

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,8 +1534,15 @@ button::-moz-focus-inner {
15341534
.tox .tox-dialog__header .tox-button {
15351535
z-index: 1;
15361536
color: var(--color-white);
1537+
height: var(--spacing-6);
15371538
background-image: none; // If used in Solidus we need to override the background image
1538-
border: none; // If used in Solidus we need to override the border
1539+
border-color: transparent; // If used in Solidus we need to override the border
1540+
1541+
&:active:not(:disabled),
1542+
&:hover:not(:disabled) {
1543+
background-color: var(--color-blue_medium);
1544+
color: var(--color-white);
1545+
}
15391546
}
15401547

15411548
.tox .tox-dialog__draghandle {
@@ -2076,11 +2083,8 @@ body.tox-dialog__disable-scroll {
20762083
}
20772084

20782085
.tox .tox-color-input span::before {
2079-
background-image: linear-gradient(
2080-
45deg,
2081-
rgba(0, 0, 0, 0.25) 25%,
2082-
transparent 25%
2083-
),
2086+
background-image:
2087+
linear-gradient(45deg, rgba(0, 0, 0, 0.25) 25%, transparent 25%),
20842088
linear-gradient(-45deg, rgba(0, 0, 0, 0.25) 25%, transparent 25%),
20852089
linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.25) 75%),
20862090
linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.25) 75%);

app/stylesheets/tinymce/skins/ui/alchemy/skin.scss

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,8 +1534,15 @@ button::-moz-focus-inner {
15341534
.tox .tox-dialog__header .tox-button {
15351535
z-index: 1;
15361536
color: var(--color-white);
1537+
height: var(--spacing-6);
15371538
background-image: none; // If used in Solidus we need to override the background image
1538-
border: none; // If used in Solidus we need to override the border
1539+
border-color: transparent; // If used in Solidus we need to override the border
1540+
1541+
&:active:not(:disabled),
1542+
&:hover:not(:disabled) {
1543+
background-color: var(--color-blue_medium);
1544+
color: var(--color-white);
1545+
}
15391546
}
15401547

15411548
.tox .tox-dialog__draghandle {
@@ -2076,11 +2083,8 @@ body.tox-dialog__disable-scroll {
20762083
}
20772084

20782085
.tox .tox-color-input span::before {
2079-
background-image: linear-gradient(
2080-
45deg,
2081-
rgba(0, 0, 0, 0.25) 25%,
2082-
transparent 25%
2083-
),
2086+
background-image:
2087+
linear-gradient(45deg, rgba(0, 0, 0, 0.25) 25%, transparent 25%),
20842088
linear-gradient(-45deg, rgba(0, 0, 0, 0.25) 25%, transparent 25%),
20852089
linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.25) 75%),
20862090
linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.25) 75%);

0 commit comments

Comments
 (0)