mirror of
https://github.com/penpot/penpot.git
synced 2025-01-10 08:50:57 -05:00
🐛 Fix extend button style in prototype tab
This commit is contained in:
parent
1cb6f43339
commit
c89a1b3b27
4 changed files with 164 additions and 143 deletions
|
@ -125,10 +125,11 @@
|
||||||
@include buttonStyle;
|
@include buttonStyle;
|
||||||
@include flexCenter;
|
@include flexCenter;
|
||||||
@include focusTertiary;
|
@include focusTertiary;
|
||||||
|
--button-tertiary-border-width: $s-2;
|
||||||
border-radius: $br-8;
|
border-radius: $br-8;
|
||||||
color: var(--button-tertiary-foreground-color-rest);
|
color: var(--button-tertiary-foreground-color-rest);
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: $s-2 solid transparent;
|
border: var(--button-tertiary-border-width) solid transparent;
|
||||||
svg,
|
svg,
|
||||||
span svg {
|
span svg {
|
||||||
stroke: var(--button-tertiary-foreground-color-rest);
|
stroke: var(--button-tertiary-foreground-color-rest);
|
||||||
|
@ -136,7 +137,7 @@
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: var(--button-tertiary-background-color-hover);
|
background-color: var(--button-tertiary-background-color-hover);
|
||||||
color: var(--button-tertiary-foreground-color-hover);
|
color: var(--button-tertiary-foreground-color-hover);
|
||||||
border: $s-2 solid var(--button-secondary-border-color-hover);
|
border-color: var(--button-secondary-border-color-hover);
|
||||||
svg,
|
svg,
|
||||||
span svg {
|
span svg {
|
||||||
stroke: var(--button-tertiary-foreground-color-hover);
|
stroke: var(--button-tertiary-foreground-color-hover);
|
||||||
|
@ -144,7 +145,7 @@
|
||||||
}
|
}
|
||||||
&:active {
|
&:active {
|
||||||
outline: none;
|
outline: none;
|
||||||
border: $s-2 solid transparent;
|
border-color: transparent;
|
||||||
background-color: var(--button-tertiary-background-color-active);
|
background-color: var(--button-tertiary-background-color-active);
|
||||||
color: var(--button-tertiary-foreground-color-active);
|
color: var(--button-tertiary-foreground-color-active);
|
||||||
svg,
|
svg,
|
||||||
|
@ -169,7 +170,7 @@
|
||||||
|
|
||||||
.button-icon-selected {
|
.button-icon-selected {
|
||||||
outline: none;
|
outline: none;
|
||||||
border: $s-2 solid var(--button-icon-border-color-selected);
|
border-color: var(--button-icon-border-color-selected);
|
||||||
background-color: var(--button-icon-background-color-selected);
|
background-color: var(--button-icon-background-color-selected);
|
||||||
color: var(--button-icon-foreground-color-selected);
|
color: var(--button-icon-foreground-color-selected);
|
||||||
svg {
|
svg {
|
||||||
|
@ -183,7 +184,7 @@
|
||||||
@include focusRadio;
|
@include focusRadio;
|
||||||
border-radius: $br-8;
|
border-radius: $br-8;
|
||||||
color: var(--button-radio-foreground-color-rest);
|
color: var(--button-radio-foreground-color-rest);
|
||||||
border: $s-1 solid var(--button-radio-background-color-rest);
|
border-color: $s-1 solid var(--button-radio-background-color-rest);
|
||||||
svg,
|
svg,
|
||||||
span svg {
|
span svg {
|
||||||
stroke: var(--button-radio-foreground-color-rest);
|
stroke: var(--button-radio-foreground-color-rest);
|
||||||
|
|
|
@ -65,6 +65,9 @@
|
||||||
--button-tertiary-border-color-focus: var(--color-accent-primary);
|
--button-tertiary-border-color-focus: var(--color-accent-primary);
|
||||||
--button-tertiary-foreground-color-focus: var(--color-foreground-primary);
|
--button-tertiary-foreground-color-focus: var(--color-foreground-primary);
|
||||||
|
|
||||||
|
--expand-button-icon-border-width: 0;
|
||||||
|
--expand-button-icon-border-width-selected: 0;
|
||||||
|
|
||||||
--button-icon-foreground-color: var(--color-foreground-secondary);
|
--button-icon-foreground-color: var(--color-foreground-secondary);
|
||||||
--button-icon-foreground-color-hover: var(--color-foreground-secondary);
|
--button-icon-foreground-color-hover: var(--color-foreground-secondary);
|
||||||
--button-icon-background-color-selected: var(--color-background-quaternary);
|
--button-icon-background-color-selected: var(--color-background-quaternary);
|
||||||
|
@ -396,4 +399,5 @@
|
||||||
--assets-item-name-foreground-color: var(--color-foreground-primary);
|
--assets-item-name-foreground-color: var(--color-foreground-primary);
|
||||||
|
|
||||||
--text-editor-selection-background-color: var(--la-tertiary-70);
|
--text-editor-selection-background-color: var(--la-tertiary-70);
|
||||||
|
--expand-button-icon-border-width-selected: 2px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -403,10 +403,10 @@
|
||||||
|
|
||||||
|
|
||||||
[:div {:class (stl/css-case :element-set-options-group true
|
[:div {:class (stl/css-case :element-set-options-group true
|
||||||
:open extended-open?)}
|
:element-set-options-group-open extended-open?)}
|
||||||
; Summary
|
; Summary
|
||||||
[:div {:class (stl/css :interactions-summary)}
|
[:div {:class (stl/css :interactions-summary)}
|
||||||
[:div {:class (stl/css-case :extend-btn true
|
[:button {:class (stl/css-case :extend-btn true
|
||||||
:extended extended-open?)
|
:extended extended-open?)
|
||||||
:on-click toggle-extended}
|
:on-click toggle-extended}
|
||||||
i/menu-refactor]
|
i/menu-refactor]
|
||||||
|
|
|
@ -96,151 +96,167 @@
|
||||||
@include flexColumn($s-12);
|
@include flexColumn($s-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
.element-set-options-group {
|
.element-set-options-group-open {
|
||||||
&.open {
|
@include flexColumn;
|
||||||
@include flexColumn;
|
}
|
||||||
.extended-options {
|
|
||||||
@include flexColumn;
|
.extended-options {
|
||||||
.property-row {
|
@include flexColumn;
|
||||||
@extend .attr-row;
|
}
|
||||||
&.big-row {
|
|
||||||
height: 100%;
|
.property-row {
|
||||||
}
|
@extend .attr-row;
|
||||||
.interaction-name {
|
&.big-row {
|
||||||
@include twoLineTextEllipsis;
|
height: 100%;
|
||||||
@include titleTipography;
|
}
|
||||||
padding-left: $s-4;
|
.interaction-name {
|
||||||
width: $s-92;
|
@include twoLineTextEllipsis;
|
||||||
margin: auto 0;
|
@include titleTipography;
|
||||||
grid-area: name;
|
padding-left: $s-4;
|
||||||
color: var(--title-foreground-color);
|
width: $s-92;
|
||||||
}
|
margin: auto 0;
|
||||||
.select-wrapper {
|
grid-area: name;
|
||||||
display: flex;
|
color: var(--title-foreground-color);
|
||||||
align-items: center;
|
}
|
||||||
grid-area: content;
|
.select-wrapper {
|
||||||
.easing-select {
|
display: flex;
|
||||||
width: $s-156;
|
align-items: center;
|
||||||
padding: 0 $s-8;
|
grid-area: content;
|
||||||
.dropdown-upwards {
|
.easing-select {
|
||||||
bottom: $s-36;
|
width: $s-156;
|
||||||
width: $s-156;
|
padding: 0 $s-8;
|
||||||
top: unset;
|
.dropdown-upwards {
|
||||||
}
|
bottom: $s-36;
|
||||||
}
|
width: $s-156;
|
||||||
}
|
top: unset;
|
||||||
.input-element-wrapper {
|
|
||||||
@extend .input-element;
|
|
||||||
grid-area: content;
|
|
||||||
}
|
|
||||||
.checkbox-option {
|
|
||||||
@extend .input-checkbox;
|
|
||||||
grid-area: content;
|
|
||||||
}
|
|
||||||
.position-btns-wrapper {
|
|
||||||
grid-area: content;
|
|
||||||
display: grid;
|
|
||||||
grid-template-areas:
|
|
||||||
"topleft top topright"
|
|
||||||
"left center right"
|
|
||||||
"bottomleft bottom bottomright";
|
|
||||||
grid-template-columns: repeat(3, 1fr);
|
|
||||||
grid-template-rows: repeat(3, 1fr);
|
|
||||||
width: $s-84;
|
|
||||||
height: $s-84;
|
|
||||||
border-radius: $br-8;
|
|
||||||
background-color: var(--color-background-tertiary);
|
|
||||||
.direction-btn {
|
|
||||||
@extend .button-tertiary;
|
|
||||||
height: $s-28;
|
|
||||||
width: $s-28;
|
|
||||||
.rectangle {
|
|
||||||
height: $s-8;
|
|
||||||
width: $s-8;
|
|
||||||
background-color: var(--color-background-quaternary);
|
|
||||||
}
|
|
||||||
&:hover {
|
|
||||||
.rectangle {
|
|
||||||
background-color: var(--color-accent-primary);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&.active {
|
|
||||||
background-color: var(--color-background-quaternary);
|
|
||||||
.rectangle {
|
|
||||||
background-color: var(--color-accent-primary);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.center-btn {
|
|
||||||
grid-area: center;
|
|
||||||
}
|
|
||||||
.top-left-btn {
|
|
||||||
grid-area: topleft;
|
|
||||||
}
|
|
||||||
.top-right-btn {
|
|
||||||
grid-area: topright;
|
|
||||||
}
|
|
||||||
.top-center-btn {
|
|
||||||
grid-area: top;
|
|
||||||
}
|
|
||||||
.bottom-left-btn {
|
|
||||||
grid-area: bottomleft;
|
|
||||||
}
|
|
||||||
.bottom-right-btn {
|
|
||||||
grid-area: bottomright;
|
|
||||||
}
|
|
||||||
.bottom-center-btn {
|
|
||||||
grid-area: bottom;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.buttons-wrapper {
|
|
||||||
grid-area: content;
|
|
||||||
.right svg {
|
|
||||||
transform: rotate(-90deg);
|
|
||||||
}
|
|
||||||
.left svg {
|
|
||||||
transform: rotate(90deg);
|
|
||||||
}
|
|
||||||
.up svg {
|
|
||||||
transform: rotate(180deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.inputs-wrapper {
|
|
||||||
grid-area: content;
|
|
||||||
@include flexRow;
|
|
||||||
.radio-btn {
|
|
||||||
@extend .input-checkbox;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.input-element-wrapper {
|
||||||
.interactions-summary {
|
@extend .input-element;
|
||||||
@extend .asset-element;
|
grid-area: content;
|
||||||
height: $s-44;
|
}
|
||||||
padding: 0;
|
.checkbox-option {
|
||||||
gap: $s-4;
|
@extend .input-checkbox;
|
||||||
.extend-btn {
|
grid-area: content;
|
||||||
|
}
|
||||||
|
.position-btns-wrapper {
|
||||||
|
grid-area: content;
|
||||||
|
display: grid;
|
||||||
|
grid-template-areas:
|
||||||
|
"topleft top topright"
|
||||||
|
"left center right"
|
||||||
|
"bottomleft bottom bottomright";
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
grid-template-rows: repeat(3, 1fr);
|
||||||
|
width: $s-84;
|
||||||
|
height: $s-84;
|
||||||
|
border-radius: $br-8;
|
||||||
|
background-color: var(--color-background-tertiary);
|
||||||
|
.direction-btn {
|
||||||
@extend .button-tertiary;
|
@extend .button-tertiary;
|
||||||
height: 100%;
|
height: $s-28;
|
||||||
width: $s-28;
|
width: $s-28;
|
||||||
svg {
|
.rectangle {
|
||||||
@extend .button-icon;
|
height: $s-8;
|
||||||
|
width: $s-8;
|
||||||
|
background-color: var(--color-background-quaternary);
|
||||||
}
|
}
|
||||||
&.extended {
|
&:hover {
|
||||||
@extend .button-icon-selected;
|
.rectangle {
|
||||||
|
background-color: var(--color-accent-primary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.active {
|
||||||
|
background-color: var(--color-background-quaternary);
|
||||||
|
.rectangle {
|
||||||
|
background-color: var(--color-accent-primary);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.center-btn {
|
||||||
.remove-btn {
|
grid-area: center;
|
||||||
@extend .button-tertiary;
|
|
||||||
height: $s-32;
|
|
||||||
width: $s-28;
|
|
||||||
svg {
|
|
||||||
@extend .button-icon-small;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
.top-left-btn {
|
||||||
|
grid-area: topleft;
|
||||||
|
}
|
||||||
|
.top-right-btn {
|
||||||
|
grid-area: topright;
|
||||||
|
}
|
||||||
|
.top-center-btn {
|
||||||
|
grid-area: top;
|
||||||
|
}
|
||||||
|
.bottom-left-btn {
|
||||||
|
grid-area: bottomleft;
|
||||||
|
}
|
||||||
|
.bottom-right-btn {
|
||||||
|
grid-area: bottomright;
|
||||||
|
}
|
||||||
|
.bottom-center-btn {
|
||||||
|
grid-area: bottom;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.buttons-wrapper {
|
||||||
|
grid-area: content;
|
||||||
|
.right svg {
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
}
|
||||||
|
.left svg {
|
||||||
|
transform: rotate(90deg);
|
||||||
|
}
|
||||||
|
.up svg {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.inputs-wrapper {
|
||||||
|
grid-area: content;
|
||||||
|
@include flexRow;
|
||||||
|
.radio-btn {
|
||||||
|
@extend .input-checkbox;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.interactions-summary {
|
||||||
|
@extend .asset-element;
|
||||||
|
height: $s-44;
|
||||||
|
padding: 0;
|
||||||
|
gap: $s-8;
|
||||||
|
|
||||||
|
.remove-btn {
|
||||||
|
@extend .button-tertiary;
|
||||||
|
height: $s-32;
|
||||||
|
width: $s-28;
|
||||||
|
svg {
|
||||||
|
@extend .button-icon-small;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.extend-btn {
|
||||||
|
@extend .button-tertiary;
|
||||||
|
--button-tertiary-border-width: var(--expand-button-icon-border-width);
|
||||||
|
height: 100%;
|
||||||
|
width: $s-28;
|
||||||
|
border-end-end-radius: 0;
|
||||||
|
border-start-end-radius: 0;
|
||||||
|
padding: 0;
|
||||||
|
svg {
|
||||||
|
@extend .button-icon;
|
||||||
|
}
|
||||||
|
position: relative;
|
||||||
|
&:after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
border-inline-end: $s-1 solid var(--panel-background-color);
|
||||||
|
}
|
||||||
|
&.extended {
|
||||||
|
@extend .button-icon-selected;
|
||||||
|
--button-tertiary-border-width: var(--expand-button-icon-border-width-selected);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue