bulma/sass/components/panel.sass

146 lines
4.8 KiB
Sass
Raw Normal View History

2020-08-22 09:54:08 +00:00
$panel-font-size: var(--size-normal, #{$size-normal}) !default
2019-05-17 12:50:39 +00:00
$panel-margin: $block-spacing !default
2019-10-12 22:57:31 +00:00
$panel-item-border: 1px solid $border-light !default
$panel-radius: $radius-large !default
2019-10-13 14:12:30 +00:00
$panel-shadow: 0 0.5em 1em -0.125em rgba($scheme-invert, 0.1), 0 0px 0 1px rgba($scheme-invert, 0.02) !default
2017-07-28 20:05:15 +00:00
2019-10-14 00:42:05 +00:00
$panel-heading-background-color: $border-light !default
2017-07-28 20:05:15 +00:00
$panel-heading-color: $text-strong !default
$panel-heading-line-height: 1.25 !default
2019-10-12 22:57:31 +00:00
$panel-heading-padding: 0.75em 1em !default
2017-07-28 20:05:15 +00:00
$panel-heading-radius: $radius !default
$panel-heading-size: 1.25em !default
2019-10-12 22:57:31 +00:00
$panel-heading-weight: $weight-bold !default
2017-07-28 20:05:15 +00:00
2019-05-17 12:50:39 +00:00
$panel-tabs-font-size: 0.875em !default
2017-07-28 20:05:15 +00:00
$panel-tab-border-bottom: 1px solid $border !default
$panel-tab-active-border-bottom-color: $link-active-border !default
$panel-tab-active-color: $link-active !default
$panel-list-item-color: $text !default
$panel-list-item-hover-color: $link !default
$panel-block-color: $text-strong !default
$panel-block-hover-background-color: $background !default
$panel-block-active-border-left-color: $link !default
$panel-block-active-color: $link-active !default
$panel-block-active-icon-color: $link !default
$panel-icon-color: $text-light !default
2019-10-20 01:11:13 +00:00
$panel-colors: $colors !default
2017-07-28 20:05:15 +00:00
2016-10-30 23:35:30 +00:00
.panel
2020-08-22 09:54:08 +00:00
--panel-font-size: #{$panel-font-size}
--panel-radius: #{$panel-radius}
--panel-shadow: #{$panel-shadow}
--panel-margin: #{$panel-margin}
--panel-item-border: #{$panel-item-border}
--panel-radius: #{$panel-radius}
--panel-heading-background-color: #{$panel-heading-background-color}
--panel-heading-color: #{$panel-heading-color}
--panel-heading-size: #{$panel-heading-size}
--panel-heading-weight: #{$panel-heading-weight}
--panel-heading-line-height: #{$panel-heading-line-height}
--panel-heading-padding: #{$panel-heading-padding}
--panel-tabs-font-size: #{$panel-tabs-font-size}
--panel-tab-border-bottom: #{$panel-tab-border-bottom}
--panel-tab-active-border-bottom-color: #{$panel-tab-active-border-bottom-color}
--panel-tab-active-color: #{$panel-tab-active-color}
--panel-list-item-color: #{$panel-list-item-color}
--panel-list-item-hover-color: #{$panel-list-item-hover-color}
--panel-block-color: #{$panel-block-color}
--panel-block-active-border-left-color: #{$panel-block-active-border-left-color}
--panel-block-active-color: #{$panel-block-active-color}
--panel-block-active-icon-color: #{$panel-block-active-icon-color}
--panel-block-hover-background-color: #{$panel-block-hover-background-color}
--panel-icon-color: #{$panel-icon-color}
border-radius: var(--panel-radius)
box-shadow: var(--panel-shadow)
font-size: var(--panel-font-size)
2016-10-30 23:35:30 +00:00
&:not(:last-child)
2020-08-22 09:54:08 +00:00
margin-bottom: var(--panel-margin)
2019-10-14 00:42:05 +00:00
// Colors
2019-10-20 01:11:13 +00:00
@each $name, $components in $panel-colors
2019-10-14 00:42:05 +00:00
$color: nth($components, 1)
$color-invert: nth($components, 2)
&.is-#{$name}
.panel-heading
background-color: $color
color: $color-invert
.panel-tabs a.is-active
border-bottom-color: $color
.panel-block.is-active .panel-icon
color: $color
2016-10-30 23:35:30 +00:00
.panel-tabs,
.panel-block
2019-10-12 22:57:31 +00:00
&:not(:last-child)
2020-08-22 09:54:08 +00:00
border-bottom: var(--panel-item-border)
2016-03-25 13:38:40 +00:00
.panel-heading
2020-08-22 09:54:08 +00:00
background-color: var(--panel-heading-background-color)
border-radius: var(--panel-radius) var(--panel-radius) 0 0
color: var(--panel-heading-color)
font-size: var(--panel-heading-size)
font-weight: var(--panel-heading-weight)
line-height: var(--panel-heading-line-height)
padding: var(--panel-heading-padding)
2016-03-25 13:38:40 +00:00
.panel-tabs
2016-10-30 23:35:30 +00:00
align-items: flex-end
2016-03-25 13:38:40 +00:00
display: flex
2020-08-22 09:54:08 +00:00
font-size: var(--panel-tabs-font-size)
2016-03-25 13:38:40 +00:00
justify-content: center
a
2020-08-22 09:54:08 +00:00
border-bottom: var(--panel-tab-border-bottom)
2016-03-25 13:38:40 +00:00
margin-bottom: -1px
2016-10-30 23:35:30 +00:00
padding: 0.5em
2016-04-10 15:27:27 +00:00
// Modifiers
2016-03-25 13:38:40 +00:00
&.is-active
2020-08-22 09:54:08 +00:00
border-bottom-color: var(--panel-tab-active-border-bottom-color)
color: var(--panel-tab-active-color)
2016-10-30 23:35:30 +00:00
.panel-list
a
2020-08-22 09:54:08 +00:00
color: var(--panel-list-item-color)
2016-10-30 23:35:30 +00:00
&:hover
2020-08-22 09:54:08 +00:00
color: var(--panel-list-item-hover-color)
2016-03-25 13:38:40 +00:00
.panel-block
2016-10-30 23:35:30 +00:00
align-items: center
2020-08-22 09:54:08 +00:00
color: var(--panel-block-color)
2016-10-30 23:35:30 +00:00
display: flex
justify-content: flex-start
padding: 0.5em 0.75em
input[type="checkbox"]
2020-01-22 09:14:04 +00:00
+ltr-property("margin", 0.75em)
2016-10-30 23:35:30 +00:00
& > .control
flex-grow: 1
flex-shrink: 1
width: 100%
2017-03-27 08:33:11 +00:00
&.is-wrapped
flex-wrap: wrap
2016-10-30 23:35:30 +00:00
&.is-active
2020-08-22 09:54:08 +00:00
border-left-color: var(--panel-block-active-border-left-color)
color: var(--panel-block-active-color)
2016-10-30 23:35:30 +00:00
.panel-icon
2020-08-22 09:54:08 +00:00
color: var(--panel-block-active-icon-color)
2019-10-12 22:57:31 +00:00
&:last-child
2020-08-22 09:54:08 +00:00
border-bottom-left-radius: var(--panel-radius)
border-bottom-right-radius: var(--panel-radius)
2016-03-25 13:38:40 +00:00
2016-10-30 23:35:30 +00:00
a.panel-block,
label.panel-block
cursor: pointer
&:hover
2020-08-22 09:54:08 +00:00
background-color: var(--panel-block-hover-background-color)
2016-10-30 23:35:30 +00:00
.panel-icon
+fa(14px, 1em)
2020-08-22 09:54:08 +00:00
color: var(--panel-icon-color)
2020-01-22 09:14:04 +00:00
+ltr-property("margin", 0.75em)
2016-10-30 23:35:30 +00:00
.fa
font-size: inherit
line-height: inherit