Skip to content

Commit ad2531b

Browse files
authored
[6.x] Field toolbar fixes (#12768)
1 parent 0f5e25a commit ad2531b

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

resources/css/components/fieldtypes/bard.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
=================================================== */
5454
@layer ui {
5555
.bard-fixed-toolbar {
56-
@apply top-0 z-5 flex items-start justify-between rounded-t-[calc(var(--radius-lg)-1px)] border-b border-gray-300 bg-gray-50 p-1 text-sm shadow-none px-2 py-1 dark:border-white/10 dark:bg-gray-925;
56+
@apply top-0 flex items-start justify-between rounded-t-[calc(var(--radius-lg)-1px)] border-b border-gray-300 bg-gray-50 p-1 text-sm shadow-none px-2 py-1 dark:border-white/10 dark:bg-gray-925;
5757

5858
.bard-toolbar-button {
5959
@apply m-0 flex size-8 items-center justify-center rounded-sm px-1 text-center text-base text-gray-900 dark:text-gray-100;

resources/css/components/fieldtypes/grid.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
}
1414

1515
thead th {
16-
@apply sticky -top-2 table-cell z-10 border-b bg-gray-100/75 p-2 text-sm font-medium text-gray-900 dark:border-gray-700 dark:bg-gray-925 dark:text-gray-100;
16+
@apply sticky -top-2 table-cell z-(--z-index-draggable) border-b bg-gray-50 p-2 text-sm font-medium text-gray-900 dark:border-gray-700 dark:bg-gray-925 dark:text-gray-100;
1717
/* Prevent the sticky toolbar from hitting the very end of container, which causes it to overlap the container's border-radius */
1818
margin-block-end: 8px;
1919
/* Pull the subsequent element up to compensate for this */
@@ -41,7 +41,7 @@
4141

4242
/* Grid fieldtype > Bard fieldtype */
4343
.bard-fixed-toolbar {
44-
@apply top-8;
44+
@apply top-7;
4545
}
4646

4747
/* Bard field with a fixed toolbar > Grid fieldtype > Bard fieldtype */

resources/css/components/fieldtypes/markdown.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,15 @@
4949

5050
/* Sticky Toolbar
5151
========================================================================== */
52-
5352
[data-markdown-toolbar] {
5453
@apply flex items-center justify-between rounded-t-[calc(var(--radius-lg)-1px)] bg-gray-50 px-2 py-1 overflow-x-auto;
5554
@apply sticky -top-2 z-8 border-b border-gray-300 dark:border-white/20 dark:border-b-white/10 dark:bg-gray-925;
55+
/* Prevent the sticky toolbar from hitting the very end of container, which causes it to overlap the container's border-radius */
56+
margin-block-end: 8px;
57+
/* Pull the subsequent element up to compensate for this */
58+
~ * {
59+
margin-block-start: -8px;
60+
}
5661
}
5762

5863
.grid-cell [data-markdown-toolbar] {

0 commit comments

Comments
 (0)