-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix: OPTIC-988: Convert styl files to scss #6194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
c697062
0a4a853
97758dd
897c1a0
a30e5f8
21ad034
e8ac7a6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
This file was deleted.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
This file was deleted.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,317 @@ | ||
.button { | ||
--button-color: var(--sand_900); | ||
height: 32px; | ||
border: none; | ||
cursor: pointer; | ||
padding: 0 15px; | ||
outline: none; | ||
display: inline-flex; | ||
background-color: var(--sand_0); | ||
align-items: center; | ||
border-radius: 5px; | ||
text-align: center; | ||
text-decoration: none; | ||
transition: all 100ms ease; | ||
justify-content: center; | ||
color: var(--button-color); | ||
box-shadow: inset 0px -1px 0px rgba(0, 0, 0, 0.1), inset 0px 0px 0px 1px rgba(0, 0, 0, 0.15); | ||
|
||
font-weight: 500; | ||
font-size: 14px; | ||
|
||
&_newUI { | ||
.button__extra { | ||
margin-left: 3px; | ||
} | ||
} | ||
|
||
&_waiting, | ||
&_disabled, | ||
&:disabled, | ||
&[disabled] { | ||
--button-color: var(--sand_500); | ||
pointer-events: none; | ||
background-color: var(--sand_200); | ||
} | ||
|
||
&:hover { | ||
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.05), inset 0px -1px 0px rgba(0, 0, 0, 0.1), inset 0px 0px 0px 1px rgba(0, 0, 0, 0.2); | ||
} | ||
|
||
&:active { | ||
background: linear-gradient(0deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.02)), var(--sand_0); | ||
box-shadow: inset 0px 1px 0px rgba(0, 0, 0, 0.1), inset 0px 0px 0px 1px rgba(0, 0, 0, 0.2); | ||
} | ||
|
||
&:focus { | ||
outline: none; | ||
box-shadow: 0px 0px 0px 6px var(--grape_100), inset 0px -1px 0px rgba(0, 0, 0, 0.1), inset 0px 0px 0px 1px rgba(0, 0, 0, 0.15), inset 0px 0px 0px 1px var(--grape_100); | ||
} | ||
|
||
&__extra { | ||
font-size: 14px; | ||
line-height: 16px; | ||
display: flex; | ||
color: var(--sand_500); | ||
align-items: center; | ||
margin-left: 7px; | ||
margin-right: -7px; | ||
} | ||
|
||
&__icon { | ||
display: flex; | ||
width: 16px; | ||
height: 100%; | ||
align-items: center; | ||
|
||
&:not(:only-child) { | ||
margin-right: 12px; | ||
} | ||
|
||
&:only-child { | ||
flex: 1; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
} | ||
|
||
&_type { | ||
&_text { | ||
padding: 0; | ||
} | ||
|
||
&_text, | ||
&_link, | ||
&[href] { | ||
padding: 0; | ||
min-width: 0; | ||
box-shadow: none; | ||
background: none; | ||
|
||
&:hover { | ||
box-shadow: none; | ||
} | ||
} | ||
|
||
&_link, | ||
&[href] { | ||
--button-color: var(--primary_link); | ||
text-decoration: underline; | ||
} | ||
} | ||
|
||
&_look { | ||
&_primary { | ||
--button-color: var(--sand_0); | ||
background-color: var(--primary_link); | ||
box-shadow: none; | ||
box-shadow: inset 0px -1px 0px rgba(0, 0, 0, 0.1); | ||
|
||
&:disabled { | ||
--button-color: var(--sand_500); | ||
background-color: var(--sand_200); | ||
} | ||
|
||
&:hover { | ||
color: var(rgba(255, 255, 255, 0.8)); | ||
background: linear-gradient(0deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1)), var(--primary_link); | ||
box-shadow: 0px 2px 4px var(--grape_100), inset 0px -1px 0px rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
&:active { | ||
color: var(rgba(255, 255, 255, 0.8)); | ||
background: linear-gradient(0deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.04)), var(--primary_link); | ||
box-shadow: inset 0px 1px 0px rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
&:focus { | ||
box-shadow: 0px 0px 0px 6px var(--grape_100), inset 0px -1px 0px rgba(0, 0, 0, 0.1); | ||
} | ||
} | ||
|
||
&_danger { | ||
--button-color: var(--danger_color); | ||
} | ||
|
||
&_destructive { | ||
--button-color: var(--sand_0); | ||
background-color: var(--danger_color); | ||
} | ||
|
||
&_outlined { | ||
background: none; | ||
padding: 1.5rem 2rem; | ||
font-size: 0.875rem; | ||
border: 1px solid var(--primary_link); | ||
outline: none; | ||
box-shadow: none; | ||
color: var(--grape_700); | ||
} | ||
|
||
&_alt { | ||
--button-color: var(--sand_900); | ||
box-shadow: none; | ||
background-color: var(--sand_0); | ||
|
||
&:hover, | ||
&:focus, | ||
&:active { | ||
--button-color: var(--sand_900); | ||
box-shadow: none; | ||
background-color: var(--sand_100); | ||
} | ||
|
||
&:disabled { | ||
--button-color: var(--sand_500); | ||
background-color: var(--sand_200); | ||
} | ||
} | ||
|
||
&_active { | ||
background: none; | ||
border-radius: 4px; | ||
border: 1px solid var(--sand_300); | ||
box-shadow: none; | ||
outline: none; | ||
|
||
&:focus { | ||
box-shadow: none; | ||
} | ||
} | ||
} | ||
|
||
&_look_destructive:disabled, | ||
&_look_destructive.button_waiting { | ||
--button-color: rgba(255, 255, 255, 0.5); | ||
background-color: var(--danger_color); | ||
} | ||
|
||
&_danger.button_look_alt, | ||
&_danger.button_type_text { | ||
--button-color: var(--danger_color); | ||
|
||
&:disabled { | ||
--button-color: var(--sand_500); | ||
background-color: var(--sand_200); | ||
} | ||
} | ||
|
||
&_size { | ||
&_compact { | ||
height: 36px; | ||
font-size: 16px; | ||
line-height: 20px; | ||
} | ||
|
||
&_medium { | ||
height: 32px; | ||
font-size: 14px; | ||
line-height: 20px; | ||
} | ||
|
||
&_small { | ||
height: 24px; | ||
font-size: 12px; | ||
line-height: 12px; | ||
padding: 0 10px; | ||
} | ||
|
||
&_large { | ||
height: 40px; | ||
font-size: 16px; | ||
} | ||
} | ||
|
||
&_size_small &__extra { | ||
margin-left: 5px; | ||
margin-right: -5px; | ||
} | ||
|
||
&_size_medium &__extra { | ||
margin-left: 7px; | ||
margin-right: -7px; | ||
} | ||
|
||
&_size_compact &__extra { | ||
margin-left: 7px; | ||
margin-right: -7px; | ||
} | ||
|
||
&_size_large &__extra { | ||
margin-left: 10px; | ||
margin-right: -10px; | ||
} | ||
|
||
&_nopadding { | ||
padding: 0; | ||
} | ||
|
||
&_withIcon { | ||
justify-content: space-between; | ||
} | ||
|
||
&_withIcon:not(.button_type_link):not(&[href]) { | ||
padding: 0 14px; | ||
} | ||
|
||
&_withIcon.button_size_small { | ||
padding: 0 10px; | ||
} | ||
|
||
&_waiting { | ||
pointer-events: none; | ||
background-repeat: repeat; | ||
background-position: 40px; | ||
background-size: 37px 100%; | ||
animation: button-waiting 1s linear infinite; | ||
background-image: var(--button-waiting-animation-bg); | ||
background-color: var(--sand_0); | ||
} | ||
|
||
&_waiting.button_look_primary { | ||
background-image: var(--primary-button-waiting-animation-bg); | ||
background-color: var(--primary_link); | ||
} | ||
|
||
&_size_small &__icon { | ||
width: 12px; | ||
|
||
&:not(:only-child) { | ||
margin-right: 8px; | ||
} | ||
} | ||
} | ||
|
||
.button-group { | ||
display: flex; | ||
|
||
&:not(.button-group_collapsed) { | ||
.button + .button { | ||
margin-left: 16px; | ||
} | ||
} | ||
|
||
&_collapsed { | ||
.button:first-child { | ||
border-radius: 5px 0 0 5px; | ||
} | ||
|
||
.button:last-child { | ||
border-radius: 0 5px 5px 0; | ||
} | ||
|
||
.button:not(:first-child):not(:last-child) { | ||
border-radius: 0; | ||
} | ||
} | ||
} | ||
|
||
@keyframes button-waiting { | ||
0% { | ||
background-position: 0 0; | ||
} | ||
|
||
100% { | ||
background-position: 37px 0; | ||
} | ||
} | ||
Uh oh!
There was an error while loading. Please reload this page.