diff options
Diffstat (limited to 'WebContent/VAADIN/themes/valo/components/_table.scss')
-rw-r--r-- | WebContent/VAADIN/themes/valo/components/_table.scss | 74 |
1 files changed, 65 insertions, 9 deletions
diff --git a/WebContent/VAADIN/themes/valo/components/_table.scss b/WebContent/VAADIN/themes/valo/components/_table.scss index deef084561..46318590d0 100644 --- a/WebContent/VAADIN/themes/valo/components/_table.scss +++ b/WebContent/VAADIN/themes/valo/components/_table.scss @@ -4,7 +4,7 @@ $v-table-border-color: null !default; $v-table-border-radius: 0 !default; $v-table-cell-padding-horizontal: round($v-unit-size/3) !default; //$v-table-cell-padding-horizontal-edge: round($v-unit-size/2.5) !default; -$v-table-resizer-width: round($v-unit-size/5) !default; +$v-table-resizer-width: round($v-unit-size/4.5) !default; $v-table-sort-indicator-width: round($v-unit-size/2) !default; $v-table-header-font-size: round($v-font-size * 0.86) !default; $v-table-background-color: null !default; @@ -60,7 +60,7 @@ $v-table-background-color: null !default; } -@mixin valo-table ($primary-stylename: v-table) { +@mixin valo-table ($primary-stylename: v-table, $include-additional-styles: contains($v-included-additional-styles, table)) { $background-color: $v-table-background-color or valo-table-background-color(); $border-color: $v-table-border-color or first-color(valo-border($color: $background-color, $strength: 0.8)); @@ -72,9 +72,9 @@ $v-table-background-color: null !default; color: valo-font-color($v-background-color); } - .v-table-header table, - .v-table-footer table, - .v-table-table { + .#{$primary-stylename}-header table, + .#{$primary-stylename}-footer table, + .#{$primary-stylename}-table { @include box-shadow(0 0 0 $v-table-border-width $border-color); .v-ie8 & { @@ -155,13 +155,14 @@ $v-table-background-color: null !default; cursor: col-resize; position: absolute; top: 0; - right: 0; + right: round($v-table-resizer-width / -2); z-index: 1; } .#{$primary-stylename}-cell-content { border-left: $v-table-border-width solid $border-color; overflow: hidden; + height: $v-table-row-height; &:first-child { border-left: none; @@ -177,10 +178,15 @@ $v-table-background-color: null !default; .#{$primary-stylename}-cell-wrapper { line-height: 1; + min-height: $v-table-row-height; $vertical-padding: round(($v-table-row-height - $v-font-size)/2); padding: $vertical-padding $v-table-cell-padding-horizontal; @include box-sizing(border-box); margin-right: 0 !important; + + > .v-widget { + margin: round($vertical-padding / -2) round($v-table-cell-padding-horizontal / -2); + } } .#{$primary-stylename}-body { @@ -287,12 +293,13 @@ $v-table-background-color: null !default; } .#{$primary-stylename}-focus-slot-right { - border-right: 2px solid rgba($v-focus-color, .5); + border-right: $v-table-border-width + 2px solid $v-focus-color; + right: -$v-table-border-width - 1px; } .#{$primary-stylename}-focus-slot-left { - border-left: 2px solid rgba($v-focus-color, .5); - left: 0; + border-left: $v-table-border-width + 2px solid $v-focus-color; + left: -$v-table-border-width; right: auto; margin-left: 0 !important; } @@ -429,6 +436,7 @@ $v-table-background-color: null !default; content: ""; display: block; position: absolute; + z-index: 1; height: $v-table-row-height + $v-table-border-width; left: 0; right: 0; @@ -466,6 +474,44 @@ $v-table-background-color: null !default; line-height: 0; } + + + + @if $include-additional-styles { + .#{$primary-stylename}-no-stripes { + @include valo-table-no-stripes-style; + } + + .#{$primary-stylename}-no-vertical-lines { + @include valo-table-no-vertical-lines-style; + } + + .#{$primary-stylename}-no-horizontal-lines { + @include valo-table-no-horizontal-lines-style; + } + + .#{$primary-stylename}-no-header { + @include valo-table-no-header-style; + } + + .#{$primary-stylename}-borderless { + @include valo-table-borderless-style; + } + + .#{$primary-stylename}-compact, + .#{$primary-stylename}-small { + @include valo-table-spacing-style($row-height: round($v-table-row-height * $v-scaling-factor--small), $cell-padding-horizontal: round($v-table-cell-padding-horizontal / 2)); + } + + .#{$primary-stylename}-small { + font-size: $v-font-size--small; + + &.v-treetable .#{$primary-stylename}-cell-wrapper { + min-height: $v-font-size--small; + } + } + } + } @@ -588,8 +634,17 @@ $v-table-background-color: null !default; height: $row-height; } + .#{$primary-stylename}-cell-content { + height: $row-height; + } + .#{$primary-stylename}-cell-wrapper { padding: $vertical-padding $cell-padding-horizontal; + min-height: $row-height; + + > .v-widget { + margin: round($vertical-padding / -2) round($cell-padding-horizontal / -2); + } } .#{$primary-stylename}-header-cell-asc .#{$primary-stylename}-sort-indicator, @@ -610,6 +665,7 @@ $v-table-background-color: null !default; .#{$primary-stylename}-cell-wrapper { padding-left: 0; padding-right: 0; + min-height: $v-font-size; } .#{$primary-stylename}-cell-content { |