mirror of
https://github.com/penpot/penpot.git
synced 2026-08-07 13:29:07 +00:00
❇️ Make top palette scale with ui setting
This commit is contained in:
parent
8b95885056
commit
7e4c4796fa
@ -328,10 +328,15 @@
|
||||
offset (if (or (= size "s") (= size "m"))
|
||||
(/ (- icon-size-m size-px) 2)
|
||||
0)
|
||||
box (max icon-size-m size-px)
|
||||
;; The intrinsic size is expressed in rem (via a viewBox so the glyph
|
||||
;; scales with the box) so icons track the UI scale like the rest of the
|
||||
;; DS, instead of staying fixed while their scaled containers grow.
|
||||
props (mf/spread-props props
|
||||
{:class [class (stl/css :icon)]
|
||||
:width (max icon-size-m size-px)
|
||||
:height (max icon-size-m size-px)})]
|
||||
:viewBox (dm/str "0 0 " box " " box)
|
||||
:width (dm/str (/ box 16.0) "rem")
|
||||
:height (dm/str (/ box 16.0) "rem")})]
|
||||
[:> :svg props
|
||||
[:use {:href (dm/str "#icon-" icon-id)
|
||||
:x offset
|
||||
|
||||
@ -42,7 +42,14 @@
|
||||
}
|
||||
|
||||
&.hidden {
|
||||
--toolbar-offset-y: -4px;
|
||||
// Tighten the gap between the collapsed handle and the top ruler.
|
||||
--toolbar-offset-y: -5px;
|
||||
|
||||
// With rulers visible, pin the collapsed handle to a fixed offset (px, not
|
||||
// rem) so its gap to the unscaled ruler stays constant across UI scales.
|
||||
&:not(.no-rulers) {
|
||||
--toolbar-position-y: 28px;
|
||||
}
|
||||
|
||||
block-size: $sz-16;
|
||||
z-index: 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user