FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Make finder responsive using container queries · patternfly-java/patternfly-java@e2f1e48 · GitHub

Commit e2f1e48

Browse files
committed
Make finder responsive using container queries
1 parent 36fde03 commit e2f1e48

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

‎extensions/finder/npm/finder.css‎

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
--pf-v6-c-finder-MaxColumns: 4;
3131

3232
/* Column */
33-
--pf-v6-c-finder__column--Width: 18rem;
33+
--pf-v6-c-finder__column--Width: clamp(14rem, 25cqi, 20rem);
3434
--pf-v6-c-finder__column--BorderRightColor: var(--pf-t--global--border--color--default);
3535
--pf-v6-c-finder__column--BorderRightWidth: var(--pf-t--global--border--width--100);
3636

@@ -95,7 +95,7 @@
9595
--pf-v6-c-finder__preview--PaddingBlockEnd: var(--pf-t--global--spacer--200);
9696
--pf-v6-c-finder__preview--PaddingInlineStart: var(--pf-t--global--spacer--300);
9797
--pf-v6-c-finder__preview--PaddingInlineEnd: var(--pf-t--global--spacer--200);
98-
--pf-v6-c-finder__preview--MinWidth: 24rem;
98+
--pf-v6-c-finder__preview--MinWidth: clamp(16rem, 30cqi, 28rem);
9999
--pf-v6-c-finder__preview--BackgroundColor: var(--pf-t--global--background--color--primary--default);
100100
--pf-v6-c-finder__preview--BorderLeftColor: var(--pf-t--global--border--color--default);
101101
--pf-v6-c-finder__preview--BorderLeftWidth: var(--pf-t--global--border--width--100);
@@ -106,6 +106,8 @@
106106
=================================================================== */
107107

108108
.pf-v6-c-finder {
109+
container-type: inline-size;
110+
container-name: finder;
109111
display: flex;
110112
background-color: var(--pf-v6-c-finder--BackgroundColor);
111113
font-size: var(--pf-v6-c-finder--FontSize);
@@ -425,3 +427,25 @@
425427
padding-inline-start: var(--pf-v6-c-finder__preview--PaddingInlineStart);
426428
padding-inline-end: var(--pf-v6-c-finder__preview--PaddingInlineEnd);
427429
}
430+
431+
/* ===================================================================
432+
Responsive container queries
433+
=================================================================== */
434+
435+
@container finder (max-width: 40rem) {
436+
.pf-v6-c-finder {
437+
--pf-v6-c-finder-MaxColumns: 1;
438+
}
439+
}
440+
441+
@container finder (min-width: 40rem) and (max-width: 60rem) {
442+
.pf-v6-c-finder {
443+
--pf-v6-c-finder-MaxColumns: 2;
444+
}
445+
}
446+
447+
@container finder (min-width: 60rem) and (max-width: 80rem) {
448+
.pf-v6-c-finder {
449+
--pf-v6-c-finder-MaxColumns: 3;
450+
}
451+
}

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL