$v-panel-shadow-style: $v-shadow-style !default; $v-panel-border-width: $v-border-width !default; $v-panel-border-radius: $v-border-radius !default; $v-panel-caption-background-color: null !default; $v-panel-caption-gradient-depth: $v-gradient-depth/4 !default; $v-panel-caption-bevel-style: first($v-bevel-style) !default; $v-panel-caption-bevel-depth: $v-bevel-depth !default; @mixin valo-panel ($primary-stylename: v-panel) { .#{$primary-stylename} { @include valo-panel-style; } .#{$primary-stylename}-caption { @include valo-panel-caption-style; } .#{$primary-stylename}-content { @include box-sizing(border-box); width: 100%; height: 100%; @include valo-panel-adjust-content-margins; } } @function valo-panel-background-color ($context: $v-app-background-color) { $bg-color: lighten($context, 5%); @return $bg-color; } @function valo-panel-caption-background-color ($background-color) { @return $background-color or $v-app-background-color; } @function valo-panel-border-color ($background-color: $v-app-background-color) { $border-color: if(color-luminance($background-color) < color-luminance($v-app-background-color), $background-color, $v-app-background-color); $border-color: blend-darken($border-color, scale-color($border-color, $lightness: max(-30%, -$v-bevel-depth/2))); $border-color: scale-color($border-color, $saturation: -$v-bevel-depth/2); @return $border-color; } @mixin valo-panel-style { background: valo-panel-background-color(); border-radius: $v-panel-border-radius; border: $v-panel-border-width solid valo-panel-border-color(valo-panel-background-color()); box-shadow: valo-shadow($shadow-style: $v-panel-shadow-style); } @mixin valo-panel-caption-style ($background-color: $v-panel-caption-background-color) { @include box-sizing(border-box); padding: 0 round($v-unit-size/3); line-height: $v-unit-size; $_bg: valo-panel-caption-background-color($background-color); $_border-color: scale-color($_bg, $lightness: -$v-panel-caption-bevel-depth/2, $saturation: -$v-panel-caption-bevel-depth/2); border-bottom: $v-panel-border-width solid $_border-color; border-bottom-color: rgba($_border-color, .8); @include valo-gradient($color: $_bg, $depth: $v-panel-caption-gradient-depth); color: valo-font-color($_bg); font-weight: $v-caption-font-weight; font-size: $v-caption-font-size; box-shadow: valo-bevel($_bg, $bevel-style: $v-panel-caption-bevel-style, $bevel-depth: $v-panel-caption-bevel-depth, $gradient-depth: $v-panel-caption-gradient-depth); } @mixin valo-panel-well-style { $_bg: scale-color(adjust-color($v-app-background-color, $lightness: -2%), $saturation: -1.5%); background: $_bg; box-shadow: valo-shadow($shadow-style: (0 1px 0 0 v-hilite, join(inset, $v-panel-shadow-style))); border-radius: $v-border-radius; border: $v-border-width solid valo-panel-border-color(valo-panel-background-color()); .v-panel-caption { background: transparent; box-shadow: none; } } @mixin valo-panel-borderless-style { background: transparent; border: none; box-shadow: none; .v-panel-caption { background: transparent; box-shadow: none; } } @mixin valo-panel-adjust-content-margins { > .v-margin-top { padding-top: round($v-unit-size/3); } > .v-margin-right { padding-right: round($v-unit-size/3); } > .v-margin-bottom { padding-bottom: round($v-unit-size/3); } > .v-margin-left { padding-left: round($v-unit-size/3); } }