moey-ui 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -3
- package/README.md +6 -4
- package/dist/ai-rules.md +6 -6
- package/dist/llms-full.txt +194 -60
- package/dist/moey.css +138 -59
- package/dist/moey.js +214 -67
- package/dist/moey.min.css +1 -1
- package/dist/moey.min.js +163 -53
- package/package.json +4 -3
- package/src/css/adapt.css +17 -5
- package/src/css/app.css +2 -3
- package/src/css/card.css +5 -2
- package/src/css/chat.css +1 -2
- package/src/css/datatable.css +4 -2
- package/src/css/dialog.css +14 -11
- package/src/css/form-layout.css +1 -2
- package/src/css/gallery.css +57 -15
- package/src/css/helpers.css +9 -0
- package/src/css/keyboard.css +2 -1
- package/src/css/list-group.css +4 -1
- package/src/css/palette.css +4 -3
- package/src/css/player.css +2 -3
- package/src/css/reboot.css +3 -3
- package/src/css/stretched-link.css +3 -2
- package/src/css/tabbar.css +5 -3
- package/src/css/table.css +1 -0
- package/src/css/tokens.css +3 -0
- package/src/js/moey.js +213 -66
package/dist/moey.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Moey v0.
|
|
1
|
+
/*! Moey v0.3.0 | MIT License | Inter + JetBrains Mono: SIL OFL 1.1 (dist/fonts/*-OFL.txt) */
|
|
2
2
|
@layer tokens, reboot, layout, content, forms, components, helpers, utilities;
|
|
3
3
|
|
|
4
4
|
@font-face {
|
|
@@ -3232,6 +3232,9 @@
|
|
|
3232
3232
|
--mo-paper: light-dark(oklch(95.6% .006 258), oklch(13.5% .007 258));
|
|
3233
3233
|
--mo-ink: light-dark(oklch(22% .015 258), oklch(94% .005 258));
|
|
3234
3234
|
--mo-bg-body: var(--mo-paper);
|
|
3235
|
+
/* Bars that float over the page (app header, tab bar, sticky form buttons): slightly see-through,
|
|
3236
|
+
no blur, so scrolling stays light. .frosted (helpers) turns on the frosted-glass look. */
|
|
3237
|
+
--mo-glass: 97%;
|
|
3235
3238
|
--mo-bg-surface: light-dark(var(--mo-white), oklch(19.5% .009 258));
|
|
3236
3239
|
--mo-bg-raised: light-dark(var(--mo-white), oklch(25.5% .01 258)); /* overlays: lighter than cards in dark mode */
|
|
3237
3240
|
/* Neutral fills, meant for use ON a surface (hover, headers, wells) */
|
|
@@ -3377,9 +3380,9 @@
|
|
|
3377
3380
|
/* Mobile first: nothing may push the page wider than the screen */
|
|
3378
3381
|
body { overflow-wrap: break-word; }
|
|
3379
3382
|
img, svg, video, canvas, iframe { max-width: 100%; }
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
}
|
|
3383
|
+
/* Smooth scrolling only for in-page links (moey.js turns it on for that one jump), so scripts that
|
|
3384
|
+
move the page (scrollTo, scrollIntoView, "jump to post") land at once, exactly where they aimed */
|
|
3385
|
+
html.mo-smooth-scroll { scroll-behavior: smooth; }
|
|
3383
3386
|
|
|
3384
3387
|
body {
|
|
3385
3388
|
margin: 0;
|
|
@@ -3667,7 +3670,7 @@
|
|
|
3667
3670
|
--mo-sidebar-width: 16rem;
|
|
3668
3671
|
--mo-sidebar-width-collapsed: 4.25rem;
|
|
3669
3672
|
--mo-topbar-height: 3.75rem;
|
|
3670
|
-
--mo-topbar-bg:
|
|
3673
|
+
--mo-topbar-bg: var(--mo-bg-body); /* shown --mo-glass see-through (.frosted on the header: frosted glass) */
|
|
3671
3674
|
--mo-app-padding: 1rem;
|
|
3672
3675
|
display: flex;
|
|
3673
3676
|
min-height: var(--mo-app-height, 100dvh);
|
|
@@ -3931,8 +3934,7 @@
|
|
|
3931
3934
|
gap: .75rem;
|
|
3932
3935
|
height: var(--mo-topbar-height);
|
|
3933
3936
|
padding-inline: var(--mo-app-padding);
|
|
3934
|
-
background: var(--mo-topbar-bg);
|
|
3935
|
-
backdrop-filter: blur(12px) saturate(1.5);
|
|
3937
|
+
background: color-mix(in oklab, var(--mo-topbar-bg) var(--mo-glass), transparent);
|
|
3936
3938
|
--mo-badge-ring: var(--mo-bg-body); /* notification badges blend into the bar */
|
|
3937
3939
|
}
|
|
3938
3940
|
|
|
@@ -4787,6 +4789,7 @@
|
|
|
4787
4789
|
.table-sort {
|
|
4788
4790
|
display: inline-flex;
|
|
4789
4791
|
align-items: center;
|
|
4792
|
+
vertical-align: top; /* lines up by its box, not by the arrow (which comes first in right-aligned columns) */
|
|
4790
4793
|
gap: .25rem;
|
|
4791
4794
|
padding: 0;
|
|
4792
4795
|
margin: 0;
|
|
@@ -4836,8 +4839,9 @@
|
|
|
4836
4839
|
|
|
4837
4840
|
/* Stretched link, part 2 — other links and buttons in the same card stay clickable above the
|
|
4838
4841
|
stretched link's cover. This sits in an early layer on purpose: components that position their
|
|
4839
|
-
own buttons (a close button pinned to a corner) keep their placement.
|
|
4840
|
-
|
|
4842
|
+
own buttons (a close button pinned to a corner) keep their placement. Dialogs and popovers are left
|
|
4843
|
+
out: an open dialog gets tabindex="-1", and position: relative would pin it to the page top. */
|
|
4844
|
+
:has(> .stretched-link, > * .stretched-link, > * > * .stretched-link) :is(a, button, input, select, textarea, summary, label, .btn, [tabindex]):not(.stretched-link, dialog, [popover]) {
|
|
4841
4845
|
position: relative;
|
|
4842
4846
|
z-index: 2;
|
|
4843
4847
|
}
|
|
@@ -6107,17 +6111,19 @@
|
|
|
6107
6111
|
<div class="stat-value">$48,210</div>
|
|
6108
6112
|
<div class="stat-trend theme-green"><i class="mi mi-trending-up"></i> 12.4% <span>vs last month</span></div>
|
|
6109
6113
|
</div></div> */
|
|
6110
|
-
.stat { display: grid; gap: .25rem; align-content: start; }
|
|
6114
|
+
.stat { display: grid; gap: .25rem; align-content: start; min-width: 0; }
|
|
6111
6115
|
.stat-label {
|
|
6112
6116
|
display: flex;
|
|
6117
|
+
flex-wrap: wrap; /* a narrow tile (two on a small phone): the icon moves under the label */
|
|
6113
6118
|
align-items: center;
|
|
6114
6119
|
gap: .5rem;
|
|
6120
|
+
min-width: 0;
|
|
6115
6121
|
font-size: var(--mo-font-size-sm);
|
|
6116
6122
|
font-weight: var(--mo-font-weight-medium);
|
|
6117
6123
|
color: var(--mo-fg-3);
|
|
6118
6124
|
}
|
|
6119
6125
|
.stat-value {
|
|
6120
|
-
font-size: 1.75rem;
|
|
6126
|
+
font-size: clamp(1.125rem, 7vw, 1.75rem); /* a little smaller on small phones, so $48,210 fits two to a row at 280px */
|
|
6121
6127
|
font-weight: var(--mo-font-weight-semibold);
|
|
6122
6128
|
line-height: 1.2;
|
|
6123
6129
|
letter-spacing: -.025em;
|
|
@@ -6140,6 +6146,7 @@
|
|
|
6140
6146
|
place-items: center;
|
|
6141
6147
|
width: 2.25rem;
|
|
6142
6148
|
height: 2.25rem;
|
|
6149
|
+
flex: none;
|
|
6143
6150
|
margin-inline-start: auto;
|
|
6144
6151
|
font-size: 1.125rem;
|
|
6145
6152
|
color: var(--mo-theme-fg-emphasis);
|
|
@@ -6785,7 +6792,10 @@
|
|
|
6785
6792
|
.card-body:not(.card-flush) > .list-group-flush:first-child { margin-top: calc(var(--mo-list-padding-y) * -1); }
|
|
6786
6793
|
.card-body:not(.card-flush) > .list-group-flush:last-child { margin-bottom: calc(var(--mo-list-padding-y) * -1); }
|
|
6787
6794
|
/* Edge-to-edge in a .card-flush body: rows get the card's side padding */
|
|
6788
|
-
.card-flush > .list-group-flush
|
|
6795
|
+
.card-flush > .list-group-flush,
|
|
6796
|
+
.card > .list-group-flush { --mo-list-padding-x: var(--mo-card-padding); }
|
|
6797
|
+
/* Straight in a dialog, drawer or sheet (no .dialog-body around it): the same, with the dialog padding */
|
|
6798
|
+
:is(.dialog, .drawer, .sheet) > .list-group-flush { --mo-list-padding-x: var(--mo-dialog-padding); }
|
|
6789
6799
|
.dialog-flush > .list-group-flush { --mo-list-padding-x: var(--mo-dialog-padding); }
|
|
6790
6800
|
|
|
6791
6801
|
.list-group-sm { --mo-list-padding-y: .5rem; }
|
|
@@ -6806,7 +6816,9 @@
|
|
|
6806
6816
|
|
|
6807
6817
|
moey.js: opens with data-moey-open, closes on .btn-close / data-moey-dismiss /
|
|
6808
6818
|
outside click / Esc (data-moey-static keeps it open).
|
|
6809
|
-
On phones a .dialog becomes a bottom sheet (.dialog-center keeps it centered
|
|
6819
|
+
On phones a .dialog becomes a bottom sheet (.dialog-center keeps it centered,
|
|
6820
|
+
.dialog-fullscreen-phone makes it cover the screen there instead).
|
|
6821
|
+
A page can set --mo-dialog-bg / --mo-dialog-fg (on :root, say) to color every dialog, drawer and sheet.
|
|
6810
6822
|
========================================================================== */
|
|
6811
6823
|
|
|
6812
6824
|
/* Lock page scrolling while a modal is open */
|
|
@@ -6816,24 +6828,24 @@
|
|
|
6816
6828
|
:is(.dialog, .drawer, .sheet) {
|
|
6817
6829
|
--mo-dialog-padding: 1.5rem;
|
|
6818
6830
|
--mo-dialog-footer-padding: .875rem; /* space above & below the footer buttons */
|
|
6819
|
-
--mo-dialog-bg: var(--mo-bg-raised);
|
|
6820
6831
|
--mo-dialog-duration: .22s;
|
|
6821
6832
|
max-width: none;
|
|
6822
6833
|
max-height: none;
|
|
6823
6834
|
padding: 0;
|
|
6824
|
-
color: var(--mo-fg-body);
|
|
6825
|
-
background: var(--mo-dialog-bg);
|
|
6835
|
+
color: var(--mo-dialog-fg, var(--mo-fg-body)); /* --mo-dialog-bg / -fg: set them on the page to recolor them all */
|
|
6836
|
+
background: var(--mo-dialog-bg, var(--mo-bg-raised));
|
|
6826
6837
|
border: 0;
|
|
6827
6838
|
box-shadow: var(--mo-shadow-overlay);
|
|
6828
6839
|
}
|
|
6829
|
-
:is(.dialog, .drawer, .sheet)
|
|
6840
|
+
:is(.dialog, .drawer, .sheet) { flex-direction: column; } /* also while closing: the parts stay stacked, nothing reflows */
|
|
6841
|
+
:is(.dialog, .drawer, .sheet)[open] { display: flex; }
|
|
6830
6842
|
/* While a modal is open the page keeps the space of its scrollbar (no layout jump), but
|
|
6831
6843
|
fixed boxes stop short of it — so anything edge-to-edge is sized to the whole window (100vw). */
|
|
6832
6844
|
:is(.dialog, .drawer, .sheet)::backdrop {
|
|
6833
6845
|
inset-inline-end: auto;
|
|
6834
6846
|
width: 100vw;
|
|
6835
6847
|
background: oklch(14% .01 258 / .45);
|
|
6836
|
-
backdrop
|
|
6848
|
+
/* (no backdrop blur: at 2px it was barely visible, but it stalled the first opening by ~0.1s and slowed every frame) */
|
|
6837
6849
|
opacity: calc(1 - var(--mo-sheet-drag, 0)); /* fades while a sheet is dragged down */
|
|
6838
6850
|
}
|
|
6839
6851
|
:is(.dialog, .drawer, .sheet):focus-visible { outline: 0; }
|
|
@@ -6907,9 +6919,10 @@
|
|
|
6907
6919
|
/* Fullscreen: covers the whole screen (content clears the notch / home bar) */
|
|
6908
6920
|
.dialog-fullscreen { inset-inline: 0 auto; width: 100vw; max-width: none; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
|
|
6909
6921
|
|
|
6910
|
-
/* Phones: dialogs become bottom sheets (unless .dialog-center / .dialog-fullscreen) */
|
|
6922
|
+
/* Phones: dialogs become bottom sheets (unless .dialog-center / .dialog-fullscreen / .dialog-fullscreen-phone) */
|
|
6911
6923
|
@media (width < 576px) {
|
|
6912
|
-
.dialog:
|
|
6924
|
+
.dialog-fullscreen-phone { inset-inline: 0 auto; width: 100vw; max-width: none; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
|
|
6925
|
+
.dialog:not(.dialog-center, .dialog-fullscreen, .dialog-fullscreen-phone) {
|
|
6913
6926
|
inset-inline: 0 auto;
|
|
6914
6927
|
width: 100vw;
|
|
6915
6928
|
max-width: none;
|
|
@@ -7046,7 +7059,7 @@
|
|
|
7046
7059
|
/* closed state (also the starting point of the exit) */
|
|
7047
7060
|
:is(.dialog, .drawer, .sheet):not([open]),
|
|
7048
7061
|
:is(.dialog, .drawer, .sheet):not([open])::backdrop { opacity: 0; }
|
|
7049
|
-
|
|
7062
|
+
/* (a dialog opens with a small rise and closes with a plain fade) */
|
|
7050
7063
|
.drawer:not([open]) { translate: 100% 0; }
|
|
7051
7064
|
.drawer-start:not([open]) { translate: -100% 0; }
|
|
7052
7065
|
.drawer-top:not([open]) { translate: 0 -100%; }
|
|
@@ -7071,9 +7084,9 @@
|
|
|
7071
7084
|
@keyframes mo-sheet-bump { 50% { translate: 0 -.5rem; } }
|
|
7072
7085
|
|
|
7073
7086
|
@media (width < 576px) {
|
|
7074
|
-
.dialog:not(.dialog-center, .dialog-fullscreen):not([open]) { scale: 1; translate: 0 100%; }
|
|
7087
|
+
.dialog:not(.dialog-center, .dialog-fullscreen, .dialog-fullscreen-phone):not([open]) { scale: 1; translate: 0 100%; }
|
|
7075
7088
|
@starting-style {
|
|
7076
|
-
.dialog:not(.dialog-center, .dialog-fullscreen)[open] { scale: 1; translate: 0 100%; }
|
|
7089
|
+
.dialog:not(.dialog-center, .dialog-fullscreen, .dialog-fullscreen-phone)[open] { scale: 1; translate: 0 100%; }
|
|
7077
7090
|
}
|
|
7078
7091
|
}
|
|
7079
7092
|
|
|
@@ -7935,12 +7948,24 @@
|
|
|
7935
7948
|
.datepicker.is-sheet .datepicker-main { margin-inline: auto; }
|
|
7936
7949
|
.datepicker.is-sheet .datepicker-foot > .btn { min-height: 2.5rem; }
|
|
7937
7950
|
|
|
7938
|
-
/* Slide up (the
|
|
7951
|
+
/* Slide up to open, slide back down to close (the pop-up's own zoom and fade are switched off).
|
|
7952
|
+
Closing is a transition too, so the sheet keeps its size and layout until it's gone. */
|
|
7939
7953
|
@media (prefers-reduced-motion: no-preference) {
|
|
7940
|
-
.is-sheet[popover]
|
|
7941
|
-
.
|
|
7942
|
-
|
|
7943
|
-
|
|
7954
|
+
.is-sheet[popover],
|
|
7955
|
+
.is-sheet[popover]::backdrop {
|
|
7956
|
+
transition:
|
|
7957
|
+
translate .24s cubic-bezier(.2, .8, .2, 1),
|
|
7958
|
+
opacity .24s cubic-bezier(.2, .8, .2, 1),
|
|
7959
|
+
overlay .24s allow-discrete,
|
|
7960
|
+
display .24s allow-discrete;
|
|
7961
|
+
}
|
|
7962
|
+
.is-sheet[popover]:popover-open { animation: none; }
|
|
7963
|
+
.is-sheet[popover]:not(:popover-open) { opacity: 1; scale: none; translate: 0 100%; }
|
|
7964
|
+
.is-sheet[popover]:not(:popover-open)::backdrop { opacity: 0; }
|
|
7965
|
+
@starting-style {
|
|
7966
|
+
.is-sheet[popover]:popover-open { opacity: 1; scale: none; translate: 0 100%; }
|
|
7967
|
+
.is-sheet[popover]:popover-open::backdrop { opacity: 0; }
|
|
7968
|
+
}
|
|
7944
7969
|
}
|
|
7945
7970
|
.is-sheet[popover].is-dragging { transition: none; user-select: none; }
|
|
7946
7971
|
.is-sheet[popover].is-settling { transition: translate .2s ease; }
|
|
@@ -7977,7 +8002,8 @@
|
|
|
7977
8002
|
html.mo-keyboard .dialog:modal:not(.sheet) { max-height: calc(var(--mo-vv-h) - 1rem); }
|
|
7978
8003
|
html.mo-keyboard .dialog-fullscreen:modal { height: var(--mo-vv-h); max-height: var(--mo-vv-h); padding-bottom: 0; }
|
|
7979
8004
|
@media (width < 576px) {
|
|
7980
|
-
html.mo-keyboard .dialog:modal:
|
|
8005
|
+
html.mo-keyboard .dialog-fullscreen-phone:modal { height: var(--mo-vv-h); max-height: var(--mo-vv-h); padding-bottom: 0; }
|
|
8006
|
+
html.mo-keyboard .dialog:modal:not(.dialog-center, .dialog-fullscreen, .dialog-fullscreen-phone) { max-height: calc(var(--mo-vv-h) - 2.5rem); padding-bottom: 0; }
|
|
7981
8007
|
}
|
|
7982
8008
|
|
|
7983
8009
|
/* Drawers: as tall as what's visible */
|
|
@@ -8254,10 +8280,9 @@
|
|
|
8254
8280
|
z-index: 5;
|
|
8255
8281
|
padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
|
|
8256
8282
|
margin-top: 1rem;
|
|
8257
|
-
background: color-mix(in oklab, var(--mo-bg-raised)
|
|
8283
|
+
background: color-mix(in oklab, var(--mo-bg-raised) var(--mo-glass), transparent); /* .frosted: frosted glass */
|
|
8258
8284
|
border-radius: var(--mo-radius-card);
|
|
8259
8285
|
box-shadow: 0 -.25rem 1.5rem rgb(0 0 0 / .08), 0 0 0 var(--mo-border-width) var(--mo-border-color);
|
|
8260
|
-
backdrop-filter: blur(.5rem);
|
|
8261
8286
|
}
|
|
8262
8287
|
|
|
8263
8288
|
/* Only while there are unsaved changes */
|
|
@@ -10202,13 +10227,14 @@
|
|
|
10202
10227
|
border-radius: var(--mo-radius-dialog);
|
|
10203
10228
|
box-shadow: var(--mo-shadow-overlay);
|
|
10204
10229
|
}
|
|
10205
|
-
.palette
|
|
10230
|
+
.palette { flex-direction: column; } /* also while closing: nothing reflows */
|
|
10231
|
+
.palette[open] { display: flex; }
|
|
10206
10232
|
.palette:focus-visible { outline: 0; }
|
|
10207
10233
|
.palette::backdrop {
|
|
10208
10234
|
inset-inline-end: auto;
|
|
10209
10235
|
width: 100vw;
|
|
10210
10236
|
background: oklch(14% .01 258 / .35);
|
|
10211
|
-
backdrop
|
|
10237
|
+
/* (no backdrop blur: at 2px it was barely visible, but it stalled the first opening by ~0.1s and slowed every frame) */
|
|
10212
10238
|
}
|
|
10213
10239
|
@media (width < 576px) { .palette { margin-top: .5rem; } }
|
|
10214
10240
|
|
|
@@ -10327,7 +10353,7 @@
|
|
|
10327
10353
|
display var(--mo-dialog-duration) allow-discrete;
|
|
10328
10354
|
}
|
|
10329
10355
|
.palette:not([open]), .palette:not([open])::backdrop { opacity: 0; }
|
|
10330
|
-
|
|
10356
|
+
/* (it opens with a small zoom and closes with a plain fade) */
|
|
10331
10357
|
@starting-style {
|
|
10332
10358
|
.palette[open], .palette[open]::backdrop { opacity: 0; }
|
|
10333
10359
|
.palette[open] { scale: .98; }
|
|
@@ -11519,7 +11545,9 @@
|
|
|
11519
11545
|
/* First column stays put while scrolling sideways (data-moey-sticky-first) */
|
|
11520
11546
|
.datatable-sticky-first :is(th, td):first-child { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--mo-bg-surface); }
|
|
11521
11547
|
.datatable-sticky-first thead th:first-child { z-index: 3; }
|
|
11522
|
-
|
|
11548
|
+
/* with checkboxes, the name column stays too, right after the checkbox column (moey.js measures its width) */
|
|
11549
|
+
.datatable-sticky-first.has-select :is(th, td):nth-child(2) { position: sticky; inset-inline-start: var(--mo-datatable-first, 2.75rem); z-index: 1; background: var(--mo-bg-surface); }
|
|
11550
|
+
.datatable-sticky-first.has-select thead th:nth-child(2) { z-index: 3; } /* the header stays above the rows scrolling under it */
|
|
11523
11551
|
|
|
11524
11552
|
/* Phones: rows become cards (data-moey-stack) */
|
|
11525
11553
|
@media (width < 640px) {
|
|
@@ -11576,7 +11604,7 @@
|
|
|
11576
11604
|
/* Expandable details: a chevron column, and an inset panel under the open row */
|
|
11577
11605
|
.datatable :is(th, td).datatable-expand { width: 2.75rem; padding-inline: .5rem 0; }
|
|
11578
11606
|
.datatable tr:has(+ .datatable-detail-row) > td { border-bottom-color: transparent; }
|
|
11579
|
-
.datatable .datatable-detail-row > td { padding:
|
|
11607
|
+
.datatable .datatable-detail-row > td { padding: .75rem; background: none; } /* the panel is inset evenly: 12px on every side */
|
|
11580
11608
|
.datatable-detail { padding: 1rem 1.25rem; font-size: .875rem; background: var(--mo-bg-2); border-radius: var(--mo-radius-control); }
|
|
11581
11609
|
.datatable-detail > :last-child { margin-bottom: 0; }
|
|
11582
11610
|
.datatable-detail .table { margin: 0; background: transparent; }
|
|
@@ -12378,9 +12406,7 @@
|
|
|
12378
12406
|
display: flex;
|
|
12379
12407
|
align-items: stretch;
|
|
12380
12408
|
padding-bottom: env(safe-area-inset-bottom);
|
|
12381
|
-
background: color-mix(in oklab, var(--mo-bg-surface)
|
|
12382
|
-
backdrop-filter: saturate(1.6) blur(14px);
|
|
12383
|
-
-webkit-backdrop-filter: saturate(1.6) blur(14px);
|
|
12409
|
+
background: color-mix(in oklab, var(--mo-bg-surface) var(--mo-glass), transparent); /* .frosted: frosted glass */
|
|
12384
12410
|
box-shadow: 0 -1px 0 var(--mo-border-color);
|
|
12385
12411
|
transition: translate .25s var(--mo-ease);
|
|
12386
12412
|
}
|
|
@@ -12444,6 +12470,10 @@
|
|
|
12444
12470
|
background: var(--mo-default-base);
|
|
12445
12471
|
border-radius: 999px;
|
|
12446
12472
|
}
|
|
12473
|
+
/* Moey Icons is unlayered, so its `.mi { display: inline-block; line-height: 1 }` beats the grid above.
|
|
12474
|
+
Center the glyph on ::before instead (the icon CSS leaves its display and line-height alone). */
|
|
12475
|
+
.tabbar-action > .mi { text-align: center; }
|
|
12476
|
+
.tabbar-action > .mi::before { display: block; line-height: 2.75rem; }
|
|
12447
12477
|
.tabbar-action > span:not(.tabbar-badge) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
|
|
12448
12478
|
/* A floating pill instead of a full-width bar */
|
|
12449
12479
|
.tabbar-floating {
|
|
@@ -12784,8 +12814,7 @@
|
|
|
12784
12814
|
font-size: .75rem;
|
|
12785
12815
|
font-weight: var(--mo-font-weight-medium);
|
|
12786
12816
|
color: var(--mo-fg-2);
|
|
12787
|
-
background: color-mix(in oklab, var(--mo-bg-2)
|
|
12788
|
-
backdrop-filter: blur(8px);
|
|
12817
|
+
background: color-mix(in oklab, var(--mo-bg-2) var(--mo-glass), transparent);
|
|
12789
12818
|
border-radius: 999px;
|
|
12790
12819
|
}
|
|
12791
12820
|
|
|
@@ -13251,30 +13280,71 @@
|
|
|
13251
13280
|
}
|
|
13252
13281
|
|
|
13253
13282
|
/* ==========================================================================
|
|
13254
|
-
Gallery
|
|
13283
|
+
Gallery: griddy, filter & sort, infinite scroll and the lightbox (moey.js).
|
|
13255
13284
|
========================================================================== */
|
|
13256
13285
|
|
|
13257
|
-
/*
|
|
13258
|
-
|
|
13259
|
-
|
|
13286
|
+
/* Griddy: a grid whose items of different heights pack into columns with no holes. Columns come
|
|
13287
|
+
from the grid utilities (or automatic), moey.js places each item. The old names (.masonry,
|
|
13288
|
+
.masonry-dense, --mo-masonry-min, data-moey-masonry) still work. */
|
|
13289
|
+
:is(.griddy, .masonry) {
|
|
13260
13290
|
display: grid;
|
|
13261
|
-
grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--mo-masonry-min)), 1fr));
|
|
13291
|
+
grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--mo-griddy-min, var(--mo-masonry-min, 14rem))), 1fr));
|
|
13262
13292
|
gap: 1rem;
|
|
13263
13293
|
align-items: start;
|
|
13264
13294
|
}
|
|
13265
13295
|
/* the grid-cols-* utilities set --mo-columns (phone first: grid-cols-2 md:grid-cols-4) */
|
|
13266
|
-
.masonry[class*="grid-cols-"] { grid-template-columns: repeat(var(--mo-columns, 3), minmax(0, 1fr)); }
|
|
13267
|
-
.
|
|
13268
|
-
.masonry
|
|
13269
|
-
.masonry >
|
|
13270
|
-
.masonry >
|
|
13271
|
-
.masonry-
|
|
13296
|
+
:is(.griddy, .masonry)[class*="grid-cols-"] { grid-template-columns: repeat(var(--mo-columns, 3), minmax(0, 1fr)); }
|
|
13297
|
+
/* moey.js gives each item its exact place (is-ready): the grid only supplies the columns and gaps */
|
|
13298
|
+
:is(.griddy, .masonry).is-ready { position: relative; }
|
|
13299
|
+
:is(.griddy, .masonry).is-ready > * { position: absolute; box-sizing: border-box; }
|
|
13300
|
+
:is(.griddy, .masonry) > * { min-width: 0; margin: 0; }
|
|
13301
|
+
:is(.griddy, .masonry) > .span-2 { grid-column: span 2; }
|
|
13302
|
+
:is(.griddy, .masonry) > .span-3 { grid-column: span 3; }
|
|
13303
|
+
:is(.griddy-dense, .masonry-dense) { grid-auto-flow: row dense; }
|
|
13272
13304
|
@supports (grid-template-rows: masonry) {
|
|
13273
|
-
.masonry { grid-template-rows: masonry; }
|
|
13274
|
-
.masonry.is-ready { grid-auto-rows: auto; row-gap: revert-layer; }
|
|
13305
|
+
:is(.griddy, .masonry) { grid-template-rows: masonry; }
|
|
13275
13306
|
}
|
|
13307
|
+
/* Gliding: when the layout changes (a wider item, fewer columns, a new gap, the window), the items
|
|
13308
|
+
already there slide to their new place. Not while one is being dragged (that has its own slide). */
|
|
13309
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
13310
|
+
html:not(.mo-sorting) .griddy-glide.is-ready > * {
|
|
13311
|
+
transition: left .4s var(--mo-ease), right .4s var(--mo-ease), top .4s var(--mo-ease), width .4s var(--mo-ease);
|
|
13312
|
+
}
|
|
13313
|
+
}
|
|
13314
|
+
|
|
13315
|
+
/* New items arrive: data-moey-enter on any list or grid (griddy, infinite scroll, a feed). Items
|
|
13316
|
+
added later get .is-entering and --mo-enter-index (0, 1, 2… in each batch), one after another
|
|
13317
|
+
(--mo-enter-stagger apart). The value picks the effect:
|
|
13318
|
+
(empty) fade up · fade · rise · drop · zoom · pop · slide · flip · blur · none.
|
|
13319
|
+
Your own: style [data-moey-enter] > .is-entering. */
|
|
13320
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
13321
|
+
[data-moey-enter] > .is-entering {
|
|
13322
|
+
animation: mo-enter-up .45s var(--mo-ease) both;
|
|
13323
|
+
animation-delay: calc(min(var(--mo-enter-index, 0), 10) * var(--mo-enter-stagger, 60ms));
|
|
13324
|
+
}
|
|
13325
|
+
[data-moey-enter="fade"] > .is-entering { animation-name: mo-enter-fade; }
|
|
13326
|
+
[data-moey-enter="zoom"] > .is-entering { animation-name: mo-enter-zoom; }
|
|
13327
|
+
[data-moey-enter="rise"] > .is-entering { animation-name: mo-enter-rise; animation-duration: .5s; }
|
|
13328
|
+
[data-moey-enter="drop"] > .is-entering { animation-name: mo-enter-drop; animation-duration: .5s; }
|
|
13329
|
+
[data-moey-enter="pop"] > .is-entering { --mo-enter-stagger: 55ms; animation-name: mo-enter-pop; animation-duration: .45s; animation-delay: calc(min(var(--mo-enter-index, 0), 20) * var(--mo-enter-stagger)); }
|
|
13330
|
+
[data-moey-enter="slide"] > .is-entering { animation-name: mo-enter-slide; animation-duration: .5s; }
|
|
13331
|
+
[data-moey-enter="slide"]:dir(rtl) > .is-entering { animation-name: mo-enter-slide-rtl; }
|
|
13332
|
+
[data-moey-enter="flip"] > .is-entering { animation-name: mo-enter-flip; animation-duration: .5s; transform-origin: 50% 0; }
|
|
13333
|
+
[data-moey-enter="blur"] > .is-entering { animation-name: mo-enter-blur; animation-duration: .5s; }
|
|
13334
|
+
[data-moey-enter="none"] > .is-entering { animation: none; }
|
|
13335
|
+
}
|
|
13336
|
+
@keyframes mo-enter-up { from { opacity: 0; translate: 0 1rem; } }
|
|
13337
|
+
@keyframes mo-enter-fade { from { opacity: 0; } }
|
|
13338
|
+
@keyframes mo-enter-zoom { from { opacity: 0; scale: .96; } }
|
|
13339
|
+
@keyframes mo-enter-rise { from { opacity: 0; translate: 0 1.625rem; } }
|
|
13340
|
+
@keyframes mo-enter-drop { from { opacity: 0; translate: 0 -1.625rem; } }
|
|
13341
|
+
@keyframes mo-enter-pop { from { opacity: 0; scale: .001; } }
|
|
13342
|
+
@keyframes mo-enter-slide { from { opacity: 0; translate: -1.625rem 0; } }
|
|
13343
|
+
@keyframes mo-enter-slide-rtl { from { opacity: 0; translate: 1.625rem 0; } }
|
|
13344
|
+
@keyframes mo-enter-flip { from { opacity: 0; transform: perspective(900px) rotateX(-28deg); } }
|
|
13345
|
+
@keyframes mo-enter-blur { from { opacity: 0; filter: blur(14px); } }
|
|
13276
13346
|
/* Picture tiles */
|
|
13277
|
-
.masonry img,
|
|
13347
|
+
:is(.griddy, .masonry) img,
|
|
13278
13348
|
.gallery-tile img { display: block; width: 100%; height: auto; border-radius: var(--mo-radius-card); }
|
|
13279
13349
|
.gallery-tile { position: relative; display: block; overflow: hidden; color: inherit; text-decoration: none; border-radius: var(--mo-radius-card); }
|
|
13280
13350
|
.gallery-tile:focus-visible { outline: var(--mo-focus-ring-width) solid var(--mo-theme-focus-ring); outline-offset: 2px; }
|
|
@@ -13292,6 +13362,7 @@
|
|
|
13292
13362
|
.infinite-status { display: flex; gap: .625rem; align-items: center; justify-content: center; min-height: 3rem; padding: .75rem 0; font-size: .875rem; color: var(--mo-fg-3); }
|
|
13293
13363
|
.infinite-status:has(.infinite-text:empty):has(.spinner[hidden]):has(.infinite-more[hidden]) { min-height: 0; padding: 0; }
|
|
13294
13364
|
.infinite-sentinel { height: 1px; }
|
|
13365
|
+
.infinite-more[aria-busy] { opacity: 1; cursor: progress; } /* loading in place: not faded like a disabled button */
|
|
13295
13366
|
|
|
13296
13367
|
/* Lightbox — phone first: full bleed, controls float on soft gradients, one tap hides them */
|
|
13297
13368
|
.lightbox {
|
|
@@ -13369,7 +13440,7 @@
|
|
|
13369
13440
|
@media (prefers-reduced-motion: reduce) { .lightbox-top, .lightbox-bottom, .lightbox-prev, .lightbox-next { transition: none; } }
|
|
13370
13441
|
|
|
13371
13442
|
/* Hidden items really go (tiles set their own display) */
|
|
13372
|
-
:where(.masonry, .filter-items) > [hidden] { display: none !important; }
|
|
13443
|
+
:where(.griddy, .masonry, .filter-items) > [hidden] { display: none !important; }
|
|
13373
13444
|
|
|
13374
13445
|
/* ==========================================================================
|
|
13375
13446
|
Media — Moey's audio / video player and click-to-load embeds (moey.js).
|
|
@@ -13463,11 +13534,10 @@
|
|
|
13463
13534
|
font-size: 1.75rem;
|
|
13464
13535
|
color: #fff;
|
|
13465
13536
|
cursor: pointer;
|
|
13466
|
-
background: rgb(0 0 0 / .
|
|
13537
|
+
background: rgb(0 0 0 / .6);
|
|
13467
13538
|
border: 0;
|
|
13468
13539
|
border-radius: 999px;
|
|
13469
|
-
translate: -50% -50%;
|
|
13470
|
-
backdrop-filter: blur(6px);
|
|
13540
|
+
translate: -50% -50%; /* (no blur: over a playing video it would be redrawn every frame) */
|
|
13471
13541
|
}
|
|
13472
13542
|
.player-big:hover { background: rgb(0 0 0 / .7); }
|
|
13473
13543
|
.player-big:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
|
|
@@ -14134,6 +14204,15 @@
|
|
|
14134
14204
|
.hover-lift rises a little with a soft shadow .hover-grow grows a touch
|
|
14135
14205
|
.hover-dim fades a little (image tiles)
|
|
14136
14206
|
Only for a mouse (phones have no hover), and still for people who ask for less motion. */
|
|
14207
|
+
/* Frosted glass: see-through with the page blurred behind it. Moey's floating bars are only slightly
|
|
14208
|
+
see-through by default (cheaper to draw while scrolling); add .frosted to one of them (app header,
|
|
14209
|
+
tab bar, sticky form buttons, chat day pill) or to anything with a background. */
|
|
14210
|
+
.frosted {
|
|
14211
|
+
--mo-glass: 78%;
|
|
14212
|
+
-webkit-backdrop-filter: saturate(1.6) blur(14px);
|
|
14213
|
+
backdrop-filter: saturate(1.6) blur(14px);
|
|
14214
|
+
}
|
|
14215
|
+
|
|
14137
14216
|
@media (hover: hover) {
|
|
14138
14217
|
.hover-lift:hover { translate: 0 -.1875rem; box-shadow: var(--mo-shadow-lg); }
|
|
14139
14218
|
.hover-grow:hover { scale: 1.025; }
|