mirror of
https://github.com/penpot/penpot.git
synced 2025-06-14 10:01:38 +02:00
🐛 Fix outline in color type selector on view mode
This commit is contained in:
parent
2c2755b35e
commit
36bc276d93
5 changed files with 18 additions and 5 deletions
|
@ -173,6 +173,11 @@
|
||||||
background-position: 95% 48%;
|
background-position: 95% 48%;
|
||||||
background-size: 10px;
|
background-size: 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
outline: none;
|
||||||
|
&:focus,
|
||||||
|
&:focus-within {
|
||||||
|
border: 1px solid $color-primary;
|
||||||
|
}
|
||||||
|
|
||||||
option {
|
option {
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
|
|
|
@ -239,7 +239,6 @@ span.element-name {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 32px;
|
width: 32px;
|
||||||
right: 20px;
|
|
||||||
|
|
||||||
&.is-parent {
|
&.is-parent {
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
|
@ -86,7 +86,8 @@
|
||||||
(dom/blur! input-node)))
|
(dom/blur! input-node)))
|
||||||
(when esc?
|
(when esc?
|
||||||
(dom/prevent-default event)
|
(dom/prevent-default event)
|
||||||
(update-input value)))))
|
(update-input value)
|
||||||
|
(dom/blur! input-node)))))
|
||||||
|
|
||||||
handle-blur
|
handle-blur
|
||||||
(mf/use-callback
|
(mf/use-callback
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
(when-not (:gradient color) [:div (str (* 100 (:opacity color)) "%")])]))
|
(when-not (:gradient color) [:div (str (* 100 (:opacity color)) "%")])]))
|
||||||
|
|
||||||
(when-not (and on-change-format (:gradient color))
|
(when-not (and on-change-format (:gradient color))
|
||||||
[:select {:on-change #(-> (dom/get-target-val %) keyword on-change-format)}
|
[:select.color-format-select {:on-change #(-> (dom/get-target-val %) keyword on-change-format)}
|
||||||
[:option {:value "hex"}
|
[:option {:value "hex"}
|
||||||
(tr "inspect.attributes.color.hex")]
|
(tr "inspect.attributes.color.hex")]
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
[app.main.ui.icons :as i]
|
[app.main.ui.icons :as i]
|
||||||
[app.util.dom :as dom]
|
[app.util.dom :as dom]
|
||||||
[app.util.i18n :refer [tr c]]
|
[app.util.i18n :refer [tr c]]
|
||||||
|
[app.util.keyboard :as kbd]
|
||||||
[rumext.v2 :as mf]))
|
[rumext.v2 :as mf]))
|
||||||
|
|
||||||
(def exports-attrs
|
(def exports-attrs
|
||||||
|
@ -123,7 +124,13 @@
|
||||||
(fn []
|
(fn []
|
||||||
(st/emit! (dch/update-shapes ids
|
(st/emit! (dch/update-shapes ids
|
||||||
(fn [shape]
|
(fn [shape]
|
||||||
(assoc shape :exports []))))))]
|
(assoc shape :exports []))))))
|
||||||
|
manage-key-down
|
||||||
|
(mf/use-callback
|
||||||
|
(fn [event]
|
||||||
|
(let [esc? (kbd/esc? event)]
|
||||||
|
(when esc?
|
||||||
|
(dom/blur! (dom/get-target event))))))]
|
||||||
|
|
||||||
[:div.element-set.exports-options
|
[:div.element-set.exports-options
|
||||||
[:div.element-set-title
|
[:div.element-set-title
|
||||||
|
@ -156,7 +163,8 @@
|
||||||
[:option {:value "6"} "6x"]])
|
[:option {:value "6"} "6x"]])
|
||||||
[:input.input-text {:value (:suffix export)
|
[:input.input-text {:value (:suffix export)
|
||||||
:placeholder (tr "workspace.options.export.suffix")
|
:placeholder (tr "workspace.options.export.suffix")
|
||||||
:on-change (partial on-suffix-change index)}]
|
:on-change (partial on-suffix-change index)
|
||||||
|
:on-key-down manage-key-down}]
|
||||||
[:select.input-select {:value (name (:type export))
|
[:select.input-select {:value (name (:type export))
|
||||||
:on-change (partial on-type-change index)}
|
:on-change (partial on-type-change index)}
|
||||||
[:option {:value "png"} "PNG"]
|
[:option {:value "png"} "PNG"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue