Skip to content

Commit 824b603

Browse files
[#148] Updating css to the new classes
1 parent 5513559 commit 824b603

File tree

5 files changed

+26
-80
lines changed

5 files changed

+26
-80
lines changed

wp-content/themes/wp-starter/blocks/dialog/editor.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@layer components {
2-
.acf-block-dialog {
2+
.wp-block-acf-dialog {
33
@apply relative !border !border-black;
44
.inner {
5-
@apply relative p-24;
5+
@apply !relative p-24;
66
}
77

88
.acfbt-dialog-close {

wp-content/themes/wp-starter/blocks/dialog/group_672e7d812d248.json

Lines changed: 0 additions & 54 deletions
This file was deleted.

wp-content/themes/wp-starter/blocks/dialog/render.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@
1818
<div
1919
<?php if ( ! is_admin() ) : ?>
2020
x-data="{
21-
openDialog: false,
21+
openDialog: false,
2222

23-
// Close the dialog when the user clicks backdrop
24-
handleDialogClick(event) {
25-
(event.target === $refs.dialogRef) && this.handleDialogClose()
26-
},
23+
// Close the dialog when the user clicks backdrop
24+
handleDialogClick(event) {
25+
(event.target === $refs.dialogRef) && this.handleDialogClose();
26+
},
2727

28-
// Delay close to allow for animation
29-
handleDialogClose() {
30-
if (!this.openDialog) return
31-
this.openDialog = false
32-
$refs.dialogRef.close()
33-
}
28+
// Delay close to allow for animation
29+
handleDialogClose() {
30+
if (!this.openDialog) return;
31+
this.openDialog = false;
32+
$refs.dialogRef.close();
33+
}
3434
}"
3535
<?php endif; ?>
3636
>

wp-content/themes/wp-starter/blocks/dialog/render.twig

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@
1313
<div
1414
{% if function('is_admin') == false %}
1515
x-data="{
16-
openDialog: false,
16+
openDialog: false,
1717
18-
// Close the dialog when the user clicks backdrop
19-
handleDialogClick(event) {
20-
(event.target === $refs.dialogRef) && this.handleDialogClose()
21-
},
18+
// Close the dialog when the user clicks backdrop
19+
handleDialogClick(event) {
20+
(event.target === $refs.dialogRef) && this.handleDialogClose();
21+
},
2222
23-
// Delay close to allow for animation
24-
handleDialogClose() {
25-
if (!this.openDialog) return
26-
this.openDialog = false
27-
$refs.dialogRef.close()
28-
}
23+
// Delay close to allow for animation
24+
handleDialogClose() {
25+
if (!this.openDialog) return;
26+
this.openDialog = false;
27+
$refs.dialogRef.close();
28+
}
2929
}"
3030
{% endif %}
3131
>

wp-content/themes/wp-starter/blocks/dialog/view.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
}
66

77
.acf-block-dialog {
8-
@apply bottom-0 left-0 right-0 top-0 !m-auto h-1/2 w-1/2 rounded border-none bg-white;
8+
@apply top-0 right-0 bottom-0 left-0 !m-auto h-1/2 w-1/2 rounded border-none bg-white;
99

1010
&::backdrop {
1111
@apply bg-black/70;
1212
}
1313

1414
.acf-dialog-close {
15-
@apply absolute right-12 top-12 z-10 m-auto size-32 cursor-pointer border border-none border-black bg-transparent hover:bg-black;
15+
@apply absolute top-12 right-12 z-10 m-auto size-32 cursor-pointer border border-none border-black bg-transparent hover:bg-black;
1616
@apply after:flex after:items-center after:justify-center after:text-black after:content-['\2715'] hover:after:text-white;
1717
}
1818

0 commit comments

Comments
 (0)