1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-07-19 21:29:41 +02:00
codex.docs/src/frontend/styles/components/button.pcss

103 lines
1.7 KiB
Text
Raw Normal View History

.docs-button {
display: inline-flex;
align-items: center;
justify-content: center;
height: var(--height);
padding-left: 12px;
padding-right: 12px;
color: white;
font-size: 14px;
font-weight: 500;
border: none;
cursor: pointer;
transition-property: background-color;
transition-duration: 0.1s;
@apply --squircle;
&__icon {
display: inline-flex;
align-items: center;
justify-content: center;
svg {
width: 24px;
height: 24px;
display: block;
}
}
&--with-label &__icon {
margin-right: 4px;
}
&--default {
--height: 40px;
}
&--small {
--height: 32px;
}
&--primary {
background: var(--color-button-primary);
&:hover {
background: var(--color-button-primary-hover);
}
&:active {
background: var(--color-button-primary-active);
}
}
&--secondary {
background: var(--color-button-secondary);
&:hover {
background: var(--color-button-secondary-hover);
}
&:active {
background: var(--color-button-secondary-active);
}
}
&--warning {
background: var(--color-button-warning);
&:hover {
background: var(--color-button-warning-hover);
}
&:active {
background: var(--color-button-warning-active);
}
}
&--with-icon&--with-label {
padding-left: 8px;
}
&--with-icon:not(&--with-label) {
padding-right: 8px;
padding-left: 8px;
}
&--small&--with-icon&--with-label {
padding-left: 6px;
padding-right: 10px;
}
&--small&--with-icon:not(&--with-label) {
padding-right: 6px;
padding-left: 6px;
}
&--small&--with-label:not(&--with-icon) {
padding-right: 10px;
padding-left: 10px;
}
}