mirror of
https://github.com/jgthms/bulma
synced 2026-03-15 02:04:29 -07:00
197 lines
5.5 KiB
SCSS
197 lines
5.5 KiB
SCSS
@import "../utilities/mixins";
|
|
|
|
$panel-margin: getVar("block-spacing") !default;
|
|
$panel-item-border: 1px solid getVar("border-light") !default;
|
|
$panel-radius: getVar("radius-large") !default;
|
|
$panel-shadow: getVar("shadow") !default;
|
|
|
|
$panel-heading-background-color: getVar("border-light") !default;
|
|
$panel-heading-color: getVar("text-strong") !default;
|
|
$panel-heading-line-height: 1.25 !default;
|
|
$panel-heading-padding: 0.75em 1em !default;
|
|
$panel-heading-radius: getVar("radius") !default;
|
|
$panel-heading-size: 1.25em !default;
|
|
$panel-heading-weight: getVar("weight-bold") !default;
|
|
|
|
$panel-tabs-font-size: 0.875em !default;
|
|
$panel-tab-border-bottom: 1px solid getVar("border") !default;
|
|
$panel-tab-active-border-bottom-color: getVar("link-active-border") !default;
|
|
$panel-tab-active-color: getVar("link-active") !default;
|
|
|
|
$panel-list-item-color: getVar("text") !default;
|
|
$panel-list-item-hover-color: getVar("link") !default;
|
|
|
|
$panel-block-color: getVar("text-strong") !default;
|
|
$panel-block-hover-background-color: getVar("background") !default;
|
|
$panel-block-active-border-left-color: getVar("link") !default;
|
|
$panel-block-active-color: getVar("link-active") !default;
|
|
$panel-block-active-icon-color: getVar("link") !default;
|
|
|
|
$panel-icon-color: getVar("text-light") !default;
|
|
$panel-colors: $colors !default;
|
|
|
|
:root {
|
|
@include register-vars(
|
|
(
|
|
panel-margin: #{$panel-margin},
|
|
panel-item-border: #{$panel-item-border},
|
|
panel-radius: #{$panel-radius},
|
|
panel-shadow: #{$panel-shadow},
|
|
panel-heading-background-color: #{$panel-heading-background-color},
|
|
panel-heading-color: #{$panel-heading-color},
|
|
panel-heading-line-height: #{$panel-heading-line-height},
|
|
panel-heading-padding: #{$panel-heading-padding},
|
|
panel-heading-radius: #{$panel-heading-radius},
|
|
panel-heading-size: #{$panel-heading-size},
|
|
panel-heading-weight: #{$panel-heading-weight},
|
|
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-hover-background-color: #{$panel-block-hover-background-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-icon-color: #{$panel-icon-color},
|
|
)
|
|
);
|
|
}
|
|
|
|
.#{$class-prefix}panel {
|
|
border-radius: getVar("panel-radius");
|
|
box-shadow: getVar("panel-shadow");
|
|
font-size: getVar("size-normal");
|
|
|
|
&:not(:last-child) {
|
|
margin-bottom: getVar("panel-margin");
|
|
}
|
|
|
|
// Colors
|
|
@each $name, $components in $panel-colors {
|
|
$color: nth($components, 1);
|
|
$color-invert: nth($components, 2);
|
|
|
|
&.is-#{$name} {
|
|
.#{$class-prefix}panel-heading {
|
|
background-color: $color;
|
|
color: $color-invert;
|
|
}
|
|
|
|
.#{$class-prefix}panel-tabs a.is-active {
|
|
border-bottom-color: $color;
|
|
}
|
|
|
|
.#{$class-prefix}panel-block.is-active .#{$class-prefix}panel-icon {
|
|
color: $color;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.#{$class-prefix}panel-tabs,
|
|
.#{$class-prefix}panel-block {
|
|
&:not(:last-child) {
|
|
border-bottom: getVar("panel-item-border");
|
|
}
|
|
}
|
|
|
|
.#{$class-prefix}panel-heading {
|
|
background-color: getVar("panel-heading-background-color");
|
|
border-radius: $panel-radius $panel-radius 0 0;
|
|
color: getVar("panel-heading-color");
|
|
font-size: getVar("panel-heading-size");
|
|
font-weight: getVar("panel-heading-weight");
|
|
line-height: getVar("panel-heading-line-height");
|
|
padding: getVar("panel-heading-padding");
|
|
}
|
|
|
|
.#{$class-prefix}panel-tabs {
|
|
align-items: flex-end;
|
|
display: flex;
|
|
font-size: getVar("panel-tabs-font-size");
|
|
justify-content: center;
|
|
|
|
a {
|
|
border-bottom: getVar("panel-tab-border-bottom");
|
|
margin-bottom: -1px;
|
|
padding: 0.5em;
|
|
|
|
// Modifiers
|
|
&.is-active {
|
|
border-bottom-color: getVar("panel-tab-active-border-bottom-color");
|
|
color: getVar("panel-tab-active-color");
|
|
}
|
|
}
|
|
}
|
|
|
|
.#{$class-prefix}panel-list {
|
|
a {
|
|
color: getVar("panel-list-item-color");
|
|
|
|
&:hover {
|
|
color: getVar("panel-list-item-hover-color");
|
|
}
|
|
}
|
|
}
|
|
|
|
.#{$class-prefix}panel-block {
|
|
align-items: center;
|
|
color: getVar("panel-block-color");
|
|
display: flex;
|
|
justify-content: flex-start;
|
|
padding: 0.5em 0.75em;
|
|
|
|
input[type="checkbox"] {
|
|
@include ltr-property("margin", 0.75em);
|
|
}
|
|
|
|
& > .#{$class-prefix}control {
|
|
flex-grow: 1;
|
|
flex-shrink: 1;
|
|
width: 100%;
|
|
}
|
|
|
|
&.is-wrapped {
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
&.is-active {
|
|
border-left-color: getVar("panel-block-active-border-left-color");
|
|
color: getVar("panel-block-active-color");
|
|
|
|
.#{$class-prefix}panel-icon {
|
|
color: getVar("panel-block-active-icon-color");
|
|
}
|
|
}
|
|
|
|
&:last-child {
|
|
border-bottom-left-radius: getVar("panel-radius");
|
|
border-bottom-right-radius: getVar("panel-radius");
|
|
}
|
|
}
|
|
|
|
a.#{$class-prefix}panel-block,
|
|
label.#{$class-prefix}panel-block {
|
|
cursor: pointer;
|
|
|
|
&:hover {
|
|
background-color: getVar("panel-block-hover-background-color");
|
|
}
|
|
}
|
|
|
|
.#{$class-prefix}panel-icon {
|
|
@include fa(14px, 1em);
|
|
|
|
color: getVar("panel-icon-color");
|
|
|
|
@include ltr-property("margin", 0.75em);
|
|
|
|
.fa {
|
|
font-size: inherit;
|
|
line-height: inherit;
|
|
}
|
|
}
|