mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 10:38:13 -05:00
🐛 Fix problems in inspect tab
This commit is contained in:
parent
9834195f0e
commit
e2446fcc62
8 changed files with 65 additions and 48 deletions
|
@ -17,11 +17,13 @@
|
||||||
{::mf/wrap [mf/memo]
|
{::mf/wrap [mf/memo]
|
||||||
::mf/wrap-props false}
|
::mf/wrap-props false}
|
||||||
[{:keys [color on-click mini? area]}]
|
[{:keys [color on-click mini? area]}]
|
||||||
(let [on-click (mf/use-fn
|
(let [read-only? (nil? on-click)
|
||||||
(mf/deps color on-click)
|
on-click
|
||||||
(fn [event]
|
(mf/use-fn
|
||||||
(when (fn? on-click)
|
(mf/deps color on-click)
|
||||||
(^function on-click color event))))]
|
(fn [event]
|
||||||
|
(when (fn? on-click)
|
||||||
|
(^function on-click color event))))]
|
||||||
|
|
||||||
(if (uc/multiple? color)
|
(if (uc/multiple? color)
|
||||||
[:div {:on-click on-click :class (stl/css :color-bullet :multiple)}]
|
[:div {:on-click on-click :class (stl/css :color-bullet :multiple)}]
|
||||||
|
@ -39,7 +41,9 @@
|
||||||
:is-not-library-color (nil? id)
|
:is-not-library-color (nil? id)
|
||||||
:is-gradient (some? gradient)
|
:is-gradient (some? gradient)
|
||||||
:is-transparent (and opacity (> 1 opacity))
|
:is-transparent (and opacity (> 1 opacity))
|
||||||
:grid-area area)
|
:grid-area area
|
||||||
|
:read-only read-only?)
|
||||||
|
:data-readonly (str read-only?)
|
||||||
:on-click on-click}
|
:on-click on-click}
|
||||||
|
|
||||||
(cond
|
(cond
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: var(--color-bullet-background-color);
|
background-color: var(--color-bullet-background-color);
|
||||||
}
|
}
|
||||||
&:hover {
|
&:hover:not(.read-only) {
|
||||||
border: $s-2 solid var(--color-bullet-border-color-selected);
|
border: $s-2 solid var(--color-bullet-border-color-selected);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -261,7 +261,10 @@
|
||||||
:collapsabled-icon true
|
:collapsabled-icon true
|
||||||
:rotated collapsed-css?)}
|
:rotated collapsed-css?)}
|
||||||
i/arrow-refactor]]
|
i/arrow-refactor]]
|
||||||
[:span {:class (stl/css :code-lang)} "CSS"]
|
|
||||||
|
[:& select {:default-value style-type
|
||||||
|
:class (stl/css :code-lang-select)
|
||||||
|
:options [{:label "CSS" :value "css"}]}]
|
||||||
|
|
||||||
[:div {:class (stl/css :action-btns)}
|
[:div {:class (stl/css :action-btns)}
|
||||||
[:button {:class (stl/css :expand-button)
|
[:button {:class (stl/css :expand-button)
|
||||||
|
|
|
@ -17,45 +17,51 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.code-block {
|
.code-block {
|
||||||
|
font-size: $fs-14;
|
||||||
padding: 0 $s-4 $s-8 0;
|
padding: 0 $s-4 $s-8 0;
|
||||||
.code-row-lang {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
gap: $s-4;
|
|
||||||
width: 100%;
|
|
||||||
.code-lang {
|
|
||||||
@include tabTitleTipography;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.action-btns {
|
|
||||||
display: flex;
|
|
||||||
gap: $s-4;
|
|
||||||
flex: 1;
|
|
||||||
justify-content: end;
|
|
||||||
.expand-button {
|
|
||||||
@extend .button-tertiary;
|
|
||||||
height: $s-32;
|
|
||||||
width: $s-28;
|
|
||||||
svg {
|
|
||||||
@extend .button-icon;
|
|
||||||
stroke: var(--icon-foreground);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-lang-select {
|
pre {
|
||||||
@include tabTitleTipography;
|
border-radius: $br-8;
|
||||||
width: $s-92;
|
border: $s-1 solid $db-secondary;
|
||||||
border: $s-1 solid transparent;
|
padding: $s-16;
|
||||||
background-color: transparent;
|
}
|
||||||
color: var(--menu-foreground-color-disabled);
|
}
|
||||||
|
|
||||||
|
.code-row-lang {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: $s-4;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.code-lang {
|
||||||
|
@include tabTitleTipography;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.action-btns {
|
||||||
|
display: flex;
|
||||||
|
gap: $s-4;
|
||||||
|
flex: 1;
|
||||||
|
justify-content: end;
|
||||||
|
.expand-button {
|
||||||
|
@extend .button-tertiary;
|
||||||
|
height: $s-32;
|
||||||
|
width: $s-28;
|
||||||
|
svg {
|
||||||
|
@extend .button-icon;
|
||||||
|
stroke: var(--icon-foreground);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.code-row-display {
|
.code-lang-select {
|
||||||
margin-bottom: $s-8;
|
@include tabTitleTipography;
|
||||||
}
|
width: $s-72;
|
||||||
|
border: $s-1 solid transparent;
|
||||||
|
background-color: transparent;
|
||||||
|
color: var(--menu-foreground-color-disabled);
|
||||||
|
}
|
||||||
|
.code-row-display {
|
||||||
|
margin-bottom: $s-8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -203,6 +203,8 @@
|
||||||
|
|
||||||
[:& persistence-state-widget]
|
[:& persistence-state-widget]
|
||||||
|
|
||||||
|
[:div {:class (stl/css :separator)}]
|
||||||
|
|
||||||
|
|
||||||
[:div {:class (stl/css :zoom-section)}
|
[:div {:class (stl/css :zoom-section)}
|
||||||
[:& zoom-widget-workspace
|
[:& zoom-widget-workspace
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
min-width: $s-256;
|
min-width: $s-256;
|
||||||
padding: $s-8;
|
padding: $s-8;
|
||||||
gap: $s-2;
|
gap: $s-8;
|
||||||
background-color: var(--panel-background-color);
|
background-color: var(--panel-background-color);
|
||||||
.users-section {
|
.users-section {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -19,6 +19,9 @@
|
||||||
max-width: $s-72;
|
max-width: $s-72;
|
||||||
padding: $s-4 $s-6;
|
padding: $s-4 $s-6;
|
||||||
}
|
}
|
||||||
|
.separator {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
.zoom-section {
|
.zoom-section {
|
||||||
.zoom-widget {
|
.zoom-widget {
|
||||||
@include buttonStyle;
|
@include buttonStyle;
|
||||||
|
@ -27,6 +30,7 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
height: $s-28;
|
height: $s-28;
|
||||||
max-width: $s-48;
|
max-width: $s-48;
|
||||||
|
width: $s-48;
|
||||||
border-radius: $br-8;
|
border-radius: $br-8;
|
||||||
.label {
|
.label {
|
||||||
@include titleTipography;
|
@include titleTipography;
|
||||||
|
|
|
@ -35,9 +35,7 @@
|
||||||
[:& i18n/tr-html {:tag-name "span"
|
[:& i18n/tr-html {:tag-name "span"
|
||||||
:label "workspace.top-bar.read-only"}]]
|
:label "workspace.top-bar.read-only"}]]
|
||||||
[:button {:class (stl/css :done-btn)
|
[:button {:class (stl/css :done-btn)
|
||||||
:on-click handle-close-view-mode} (tr "workspace.top-bar.read-only.done")]
|
:on-click handle-close-view-mode} (tr "workspace.top-bar.read-only.done")]]]
|
||||||
[:button {:class (stl/css :close-btn)
|
|
||||||
:on-click handle-close-view-mode} i/close-refactor]]]
|
|
||||||
|
|
||||||
;; OLD
|
;; OLD
|
||||||
[:div.viewport-actions
|
[:div.viewport-actions
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
margin-left: -50%;
|
margin-left: -50%;
|
||||||
padding: $s-8;
|
padding: $s-8;
|
||||||
pointer-events: initial;
|
pointer-events: initial;
|
||||||
width: $s-512;
|
width: $s-400;
|
||||||
}
|
}
|
||||||
|
|
||||||
.viewport-actions-title {
|
.viewport-actions-title {
|
||||||
|
|
Loading…
Add table
Reference in a new issue