mirror of
https://github.com/penpot/penpot.git
synced 2025-01-10 08:50:57 -05:00
🐛 Fix problems with position absolute
This commit is contained in:
parent
8c618f95f7
commit
e9d50eb10d
3 changed files with 48 additions and 45 deletions
|
@ -40,7 +40,7 @@
|
|||
width: 18px;
|
||||
height: 18px;
|
||||
fill: $color-gray-20;
|
||||
fill-opacity: 0.3;
|
||||
fill-opacity: 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -246,6 +246,7 @@
|
|||
height: 100%;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
|
||||
&.inspect {
|
||||
.tab-container-tabs {
|
||||
|
|
|
@ -232,51 +232,53 @@
|
|||
:on-change #(on-change-z-index %)
|
||||
:value (:layout-item-z-index values)}]]]]
|
||||
|
||||
[:div.layout-row
|
||||
[:div.row-title.sizing "Sizing"]
|
||||
[:& element-behavior {:is-layout-child? is-layout-child?
|
||||
:is-layout-container? is-layout-container?
|
||||
:layout-item-v-sizing (or (:layout-item-v-sizing values) :fix)
|
||||
:layout-item-h-sizing (or (:layout-item-h-sizing values) :fix)
|
||||
:on-change-behavior on-change-behavior}]]
|
||||
|
||||
(when is-layout-child?
|
||||
[:div.layout-row
|
||||
[:div.row-title "Align"]
|
||||
[:div.btn-wrapper
|
||||
[:& align-self-row {:is-col? is-col?
|
||||
:align-self align-self
|
||||
:set-align-self set-align-self}]]])
|
||||
(when (not (:layout-item-absolute values))
|
||||
[:*
|
||||
[:div.layout-row
|
||||
[:div.row-title.sizing "Sizing"]
|
||||
[:& element-behavior {:is-layout-child? is-layout-child?
|
||||
:is-layout-container? is-layout-container?
|
||||
:layout-item-v-sizing (or (:layout-item-v-sizing values) :fix)
|
||||
:layout-item-h-sizing (or (:layout-item-h-sizing values) :fix)
|
||||
:on-change-behavior on-change-behavior}]]
|
||||
|
||||
(when is-layout-child?
|
||||
[:& margin-section {:values values
|
||||
:change-margin-style change-margin-style
|
||||
:on-margin-change on-margin-change}])
|
||||
(when is-layout-child?
|
||||
[:div.layout-row
|
||||
[:div.row-title "Align"]
|
||||
[:div.btn-wrapper
|
||||
[:& align-self-row {:is-col? is-col?
|
||||
:align-self align-self
|
||||
:set-align-self set-align-self}]]])
|
||||
|
||||
[:div.advanced-ops-body
|
||||
[:div.input-wrapper
|
||||
(for [item (cond-> []
|
||||
(= (:layout-item-h-sizing values) :fill)
|
||||
(conj :layout-item-min-w :layout-item-max-w)
|
||||
(when is-layout-child?
|
||||
[:& margin-section {:values values
|
||||
:change-margin-style change-margin-style
|
||||
:on-margin-change on-margin-change}])
|
||||
|
||||
(= (:layout-item-v-sizing values) :fill)
|
||||
(conj :layout-item-min-h :layout-item-max-h))]
|
||||
[:div.advanced-ops-body
|
||||
[:div.input-wrapper
|
||||
(for [item (cond-> []
|
||||
(= (:layout-item-h-sizing values) :fill)
|
||||
(conj :layout-item-min-w :layout-item-max-w)
|
||||
|
||||
[:div.tooltip.tooltip-bottom
|
||||
{:key (d/name item)
|
||||
:alt (tr (dm/str "workspace.options.layout-item.title." (d/name item)))
|
||||
:class (dom/classnames "maxH" (= item :layout-item-max-h)
|
||||
"minH" (= item :layout-item-min-h)
|
||||
"maxW" (= item :layout-item-max-w)
|
||||
"minW" (= item :layout-item-min-w))}
|
||||
[:div.input-element
|
||||
{:alt (tr (dm/str "workspace.options.layout-item." (d/name item)))}
|
||||
[:> numeric-input
|
||||
{:no-validate true
|
||||
:min 0
|
||||
:data-wrap true
|
||||
:placeholder "--"
|
||||
:on-click #(dom/select-target %)
|
||||
:on-change (partial on-size-change item)
|
||||
:value (get values item)
|
||||
:nillable true}]]])]]]]))
|
||||
(= (:layout-item-v-sizing values) :fill)
|
||||
(conj :layout-item-min-h :layout-item-max-h))]
|
||||
|
||||
[:div.tooltip.tooltip-bottom
|
||||
{:key (d/name item)
|
||||
:alt (tr (dm/str "workspace.options.layout-item.title." (d/name item)))
|
||||
:class (dom/classnames "maxH" (= item :layout-item-max-h)
|
||||
"minH" (= item :layout-item-min-h)
|
||||
"maxW" (= item :layout-item-max-w)
|
||||
"minW" (= item :layout-item-min-w))}
|
||||
[:div.input-element
|
||||
{:alt (tr (dm/str "workspace.options.layout-item." (d/name item)))}
|
||||
[:> numeric-input
|
||||
{:no-validate true
|
||||
:min 0
|
||||
:data-wrap true
|
||||
:placeholder "--"
|
||||
:on-click #(dom/select-target %)
|
||||
:on-change (partial on-size-change item)
|
||||
:value (get values item)
|
||||
:nillable true}]]])]]])]]))
|
||||
|
|
Loading…
Reference in a new issue