Merge pull request #2979 from penpot/alotor-small-fixes-absolute

🐛 Fix problems with position absolute
This commit is contained in:
Alejandro 2023-02-24 12:05:56 +01:00 committed by GitHub
commit 8aa0e96377
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 48 additions and 45 deletions

View file

@ -40,7 +40,7 @@
width: 18px; width: 18px;
height: 18px; height: 18px;
fill: $color-gray-20; fill: $color-gray-20;
fill-opacity: 0.3; fill-opacity: 0.5;
} }
} }
} }

View file

@ -246,6 +246,7 @@
height: 100%; height: 100%;
width: 100%; width: 100%;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden;
&.inspect { &.inspect {
.tab-container-tabs { .tab-container-tabs {

View file

@ -234,51 +234,53 @@
:on-change #(on-change-z-index %) :on-change #(on-change-z-index %)
:value (:layout-item-z-index values)}]]]] :value (:layout-item-z-index values)}]]]]
[:div.layout-row (when (not (:layout-item-absolute values))
[:div.row-title.sizing "Sizing"] [:*
[:& element-behavior {:is-layout-child? is-layout-child? [:div.layout-row
:is-layout-container? is-layout-container? [:div.row-title.sizing "Sizing"]
:layout-item-v-sizing (or (:layout-item-v-sizing values) :fix) [:& element-behavior {:is-layout-child? is-layout-child?
:layout-item-h-sizing (or (:layout-item-h-sizing values) :fix) :is-layout-container? is-layout-container?
:on-change-behavior on-change-behavior}]] :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? (when is-layout-child?
[:div.layout-row [:div.layout-row
[:div.row-title "Align"] [:div.row-title "Align"]
[:div.btn-wrapper [:div.btn-wrapper
[:& align-self-row {:is-col? is-col? [:& align-self-row {:is-col? is-col?
:align-self align-self :align-self align-self
:set-align-self set-align-self}]]]) :set-align-self set-align-self}]]])
(when is-layout-child? (when is-layout-child?
[:& margin-section {:values values [:& margin-section {:values values
:change-margin-style change-margin-style :change-margin-style change-margin-style
:on-margin-change on-margin-change}]) :on-margin-change on-margin-change}])
[:div.advanced-ops-body [:div.advanced-ops-body
[:div.input-wrapper [:div.input-wrapper
(for [item (cond-> [] (for [item (cond-> []
(= (:layout-item-h-sizing values) :fill) (= (:layout-item-h-sizing values) :fill)
(conj :layout-item-min-w :layout-item-max-w) (conj :layout-item-min-w :layout-item-max-w)
(= (:layout-item-v-sizing values) :fill) (= (:layout-item-v-sizing values) :fill)
(conj :layout-item-min-h :layout-item-max-h))] (conj :layout-item-min-h :layout-item-max-h))]
[:div.tooltip.tooltip-bottom [:div.tooltip.tooltip-bottom
{:key (d/name item) {:key (d/name item)
:alt (tr (dm/str "workspace.options.layout-item.title." (d/name item))) :alt (tr (dm/str "workspace.options.layout-item.title." (d/name item)))
:class (dom/classnames "maxH" (= item :layout-item-max-h) :class (dom/classnames "maxH" (= item :layout-item-max-h)
"minH" (= item :layout-item-min-h) "minH" (= item :layout-item-min-h)
"maxW" (= item :layout-item-max-w) "maxW" (= item :layout-item-max-w)
"minW" (= item :layout-item-min-w))} "minW" (= item :layout-item-min-w))}
[:div.input-element [:div.input-element
{:alt (tr (dm/str "workspace.options.layout-item." (d/name item)))} {:alt (tr (dm/str "workspace.options.layout-item." (d/name item)))}
[:> numeric-input [:> numeric-input
{:no-validate true {:no-validate true
:min 0 :min 0
:data-wrap true :data-wrap true
:placeholder "--" :placeholder "--"
:on-click #(dom/select-target %) :on-click #(dom/select-target %)
:on-change (partial on-size-change item) :on-change (partial on-size-change item)
:value (get values item) :value (get values item)
:nillable true}]]])]]]])) :nillable true}]]])]]])]]))