Skip to content

Commit

Permalink
cs & slight tweaks for better responsivity
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin committed Feb 5, 2025
1 parent 56d33cd commit 067b865
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 39 deletions.
2 changes: 1 addition & 1 deletion docs-assets/app/public/css/filament/support/support.css

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions docs-assets/app/public/js/filament/support/support.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/support/dist/index.css

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions packages/support/dist/index.js

Large diffs are not rendered by default.

26 changes: 24 additions & 2 deletions packages/support/resources/css/components/modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
}

& .fi-modal-window {
@apply pointer-events-auto relative row-start-2 flex w-full cursor-default flex-col bg-white ring-1 shadow-xl ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10;
@apply @container pointer-events-auto relative row-start-2 flex w-full cursor-default flex-col bg-white ring-1 shadow-xl ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10;

&.fi-align-start,
&.fi-align-left {
Expand Down Expand Up @@ -333,7 +333,7 @@
@apply px-6;

& .fi-modal-footer-actions {
@apply flex flex-col-reverse sm:grid sm:grid-cols-[repeat(auto-fit,minmax(0,1fr))];
@apply flex flex-col-reverse;
}
}

Expand All @@ -360,6 +360,28 @@
}
}
}

@supports (container-type: inline-size) {
@apply @container;

& .fi-modal-footer {
&.fi-align-center {
& .fi-modal-footer-actions {
@apply @sm:grid @sm:grid-cols-[repeat(auto-fit,minmax(0,1fr))];
}
}
}
}

@supports not (container-type: inline-size) {
& .fi-modal-footer {
&.fi-align-center {
& .fi-modal-footer-actions {
@apply sm:grid sm:grid-cols-[repeat(auto-fit,minmax(0,1fr))];
}
}
}
}
}

& .fi-modal-trigger {
Expand Down
38 changes: 17 additions & 21 deletions packages/support/resources/css/components/pagination.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,35 +83,31 @@
}

@supports (container-type: inline-size) {
@apply contain-inline-size;
@apply @container;

@container (min-width: 28rem) {
& .fi-pagination-records-per-page-select {
&:not(.fi-compact) {
@apply inline;
}
& .fi-pagination-records-per-page-select {
&:not(.fi-compact) {
@apply @md:inline;
}

&.fi-compact {
@apply hidden;
}
&.fi-compact {
@apply @md:hidden;
}
}

@container (min-width: 56rem) {
&:not(.fi-simple) {
& .fi-pagination-previous-btn,
& .fi-pagination-next-btn {
@apply hidden;
}
&:not(.fi-simple) {
& .fi-pagination-previous-btn,
& .fi-pagination-next-btn {
@apply @4xl:hidden;
}
}

& .fi-pagination-overview {
@apply inline;
}
& .fi-pagination-overview {
@apply @4xl:inline;
}

& .fi-pagination-items {
@apply flex;
}
& .fi-pagination-items {
@apply @4xl:flex;
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/support/src/SupportServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,15 @@ public function packageBooted(): void
])
->style([
...array_map(
fn (string $breakpoint, int | string $span): string => "--col-span-" . str_replace('@', 'c', $breakpoint) . ": " . match ($span) {
fn (string $breakpoint, int | string $span): string => '--col-span-' . str_replace('@', 'c', $breakpoint) . ': ' . match ($span) {
'full' => '1 / -1',
default => "span {$span} / span {$span}",
},
array_keys($span),
array_values($span),
),
...array_map(
fn (string $breakpoint, int $start): string => "--col-start-" . str_replace('@', 'c', $breakpoint) . ": " . $start,
fn (string $breakpoint, int $start): string => '--col-start-' . str_replace('@', 'c', $breakpoint) . ': ' . $start,
array_keys($start),
array_values($start),
),
Expand Down

0 comments on commit 067b865

Please sign in to comment.