mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 22:10:34 +00:00
💄 Scroll the limits dialog inside its container, group its digits
This commit is contained in:
parent
7df1f9c876
commit
d4b0944589
@ -324,12 +324,12 @@
|
||||
;; restated in the copy: the config the gates read is their one home.
|
||||
|
||||
(defn- grouped
|
||||
"A limit as a reader sees it: 50,000 rather than 50000, in the user's own
|
||||
locale, because these numbers are read once and compared to a file size."
|
||||
"A limit as a reader sees it: 50,000 rather than 50000. Grouped here
|
||||
rather than with `toLocaleString`, which silently returns the ungrouped
|
||||
digits on a build without full ICU data."
|
||||
[n]
|
||||
(if (number? n)
|
||||
(.toLocaleString ^js n)
|
||||
(dm/str n)))
|
||||
(-> (dm/str n)
|
||||
(str/replace #"\B(?=(\d{3})+(?!\d))" ",")))
|
||||
|
||||
(mf/defc limits-item*
|
||||
{::mf/private true}
|
||||
|
||||
@ -1529,11 +1529,16 @@
|
||||
border-block-start: 1px solid var(--color-background-quaternary);
|
||||
}
|
||||
|
||||
// The limits dialog is the only long modal here: bound it to the viewport
|
||||
// and let the sections scroll rather than spilling past the container.
|
||||
// The limits dialog is the only long modal here. `%modal-container-base` is
|
||||
// a flex column that does not clip, so the content div has to own the
|
||||
// scrolling: cap it against the viewport and let it shrink inside the flex
|
||||
// parent (`min-height: 0`), otherwise the sections spill past the container.
|
||||
.limits-content {
|
||||
max-height: 60vh;
|
||||
max-height: min(60vh, 32rem);
|
||||
min-height: 0;
|
||||
flex: 1 1 auto;
|
||||
overflow-y: auto;
|
||||
padding-inline-end: var(--sp-xs);
|
||||
}
|
||||
|
||||
.branches-limits-link {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user