0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-07 14:58:38 -05:00
penpot/frontend/resources/styles/common/refactor/basic-rules.scss
2023-07-04 15:35:45 +02:00

165 lines
4.2 KiB
SCSS

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Copyright (c) KALEIDOS INC
.button-primary {
@include buttonStyle;
@include flexCenter;
background-color: var(--button-primary-background-color-rest);
border: $s-1 solid var(--button-primary-border-color-rest);
color: var(--button-primary-foreground-color-rest);
&:hover {
background-color: var(--button-primary-background-color-hover);
border: $s-1 solid var(--button-primary-border-color-hover);
color: var(--button-primary-foreground-color-hover);
svg {
stroke: var(--button-primary-foreground-color-hover);
}
}
&:focus {
outline: none;
background-color: var(--button-primary-background-color-focus);
border: $s-1 solid var(--button-primary-boder-color-focus);
color: var(--button-primary-foreground-color-focus);
svg {
stroke: var(--button-primary-foreground-color-focus);
}
}
&:active {
border: 1px solid var(--button-border-focus);
outline: none;
}
&:focus-visible {
border: none;
outline: none;
}
}
.button-secondary {
@include buttonStyle;
@include flexCenter;
background-color: var(--button-secondary-background-color-rest);
border: $s-1 solid var(--button-secondary-border-color-rest);
color: var(--button-secondary-foreground-color-rest);
&:hover {
background-color: var(--button-secondary-background-color-hover);
border: $s-1 solid var(--button-secondary-border-color-hover);
color: var(--button-secondary-foreground-color-hover);
svg,
span svg {
stroke: var(--button-secondary-foreground-color-hover);
}
}
&:focus {
outline: none;
background-color: var(--button-secondary-background-color-focus);
border: $s-1 solid var(--button-secondary-boder-color-focus);
color: var(--button-secondary-foreground-color-focus);
svg {
stroke: var(--button-secondary-foreground-color-focus);
}
}
&:active {
border: none;
background-color: transparent;
}
&:focus-visible {
border: none;
outline: none;
}
}
.button-tertiary {
@include buttonStyle;
@include flexCenter;
color: var(--button-tertiary-foreground-color-rest);
svg {
stroke: var(--button-tertiary-foreground-color-rest);
}
&:hover {
background-color: var(--button-tertiary-background-color-hover);
color: var(--button-tertiary-foreground-color-hover);
svg {
stroke: var(--button-tertiary-foreground-color-hover);
}
}
&:focus {
outline: none;
border: $s-1 solid var(--button-tertiary-border-color-focus);
background-color: var(--button-tertiary-background-color-focus);
color: var(--button-tertiary-foreground-color-focus);
svg {
stroke: var(--button-tertiary-foreground-color-focus);
}
}
&:active {
border: $s-1 solid var(--button-tertiary-border-color-focus);
outline: none;
}
&:focus-visible {
border: none;
outline: none;
}
}
.button-tag {
@include buttonStyle;
@include flexCenter;
&:hover {
svg {
stroke: var(--title-foreground-color-hover);
}
}
&:focus {
outline: none;
border: 1px solid var(--button-border-focus);
background-color: var(--button-background-focus);
svg {
stroke: var(--button-foreground-focus);
}
}
&:active {
border: none;
background-color: transparent;
}
&:focus-visible {
border: none;
outline: none;
}
}
.button-icon {
@include flexCenter;
height: $s-16;
width: $s-16;
color: transparent;
fill: none;
stroke: var(--icon-foreground);
stroke-width: 1px;
}
.button-icon-small {
@extend .button-icon;
height: $s-12;
width: $s-12;
stroke-width: 1.33px;
}
.asset-element {
@include titleTipography;
display: flex;
align-items: center;
height: $s-32;
border-radius: $br-8;
margin-bottom: $s-4;
padding: $s-8 $s-12;
background-color: var(--assets-item-background-color);
color: var(--assets-item-name-foreground-color);
&:hover,
&:focus-within {
background-color: var(--assets-item-background-color-hover);
color: var(--assets-item-name-foreground-color-hover);
}
}