python-gallery/gallery/themes/default/components/buttons/block.sass

154 lines
2.9 KiB
Sass
Raw Normal View History

@mixin btn-block($color)
2023-03-25 16:22:32 +00:00
color: RGB($color)
&:hover
2023-03-25 16:22:32 +00:00
background-color: RGBA($color, 0.1)
color: RGB($color)
&:focus-visible
2023-03-25 16:22:32 +00:00
outline: 2px solid RGBA($color, 0.3)
.btn-block
padding: 0.5rem 1rem
width: auto
min-height: 2.5rem
display: flex
justify-content: center
align-items: center
gap: 0.5rem
position: relative
font-size: 1rem
font-weight: 600
text-align: center
2023-03-25 16:22:32 +00:00
background-color: transparent
color: RGB($white)
border: none
border-radius: $rad-inner
cursor: pointer
transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out
&:hover
2023-03-25 16:22:32 +00:00
background-color: RGBA($white, 0.1)
&:focus-visible
2023-03-25 16:22:32 +00:00
outline: 2px solid RGBA($white, 0.3)
&.primary
@include btn-block($primary)
&.critical
@include btn-block($critical)
&.warning
@include btn-block($warning)
&.success
@include btn-block($success)
&.info
@include btn-block($info)
2023-03-23 22:22:52 +00:00
&.black
@include btn-block($black)
.input-block
padding: 0.5rem 1rem
width: auto
min-height: 2.5rem
display: flex
justify-content: flex-start
align-items: center
position: relative
font-size: 1rem
font-weight: 600
text-align: left
2023-03-25 16:22:32 +00:00
background-color: RGBA($white, 0.1)
color: RGB($white)
border: none
2023-03-25 16:22:32 +00:00
border-bottom: 3px solid RGBA($white, 0.1)
border-radius: $rad-inner
cursor: pointer
transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out
&:not(:focus):not([value=""]):not(:placeholder-shown)
2023-03-25 16:22:32 +00:00
border-color: RGBA($white, 0.3)
&:hover
2023-03-25 16:22:32 +00:00
border-color: RGBA($white, 0.3)
&:focus
border-color: RGB($primary)
outline: none
2023-03-23 22:22:52 +00:00
&.black
@include btn-block($black)
.fileDrop-block
padding: 1rem 1.25rem
width: 100%
min-height: 2.5rem
display: flex
flex-direction: column
justify-content: center
align-items: center
gap: 0.5rem
position: relative
font-size: 1rem
font-weight: 600
text-align: center
2023-03-25 16:22:32 +00:00
background-color: RGBA($white, 0.1)
color: RGB($white)
border: none
border-radius: $rad-inner
cursor: pointer
transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out
input
position: absolute
inset: 0
opacity: 0
cursor: pointer
&:hover
2023-03-25 16:22:32 +00:00
background-color: RGBA($white, 0.2)
color: RGB($white)
&:focus-visible
outline: 2px solid RGBA($white, 0.3)
&.active
2023-03-25 16:22:32 +00:00
background-color: RGBA($primary, 0.2)
color: RGB($primary)
&.edging
2023-03-25 16:22:32 +00:00
background-color: RGBA($white, 0.2)
color: RGB($white)
input
display: none // So it doesnt get in the way of the drop as that breaks things
&.error
2023-03-25 16:22:32 +00:00
background-color: RGBA($critical, 0.2)
color: RGB($critical)