diff options
author | Ilia Motornyi <elmot@vaadin.com> | 2017-05-23 15:10:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-23 15:10:45 +0300 |
commit | 77a0d562a330e15463e0cd29d1b87a5b312c8bf5 (patch) | |
tree | e34fb1f9b6d40b1123d46b5bb6470a4f7ac0e175 /themes | |
parent | 7b506a70c89c83451b113a7549b6fbe2268b5b26 (diff) | |
download | vaadin-framework-77a0d562a330e15463e0cd29d1b87a5b312c8bf5.tar.gz vaadin-framework-77a0d562a330e15463e0cd29d1b87a5b312c8bf5.zip |
New Tree component theme
Fixes #9310
Diffstat (limited to 'themes')
-rw-r--r-- | themes/src/main/themes/VAADIN/themes/valo/components/_tree8.scss | 66 |
1 files changed, 34 insertions, 32 deletions
diff --git a/themes/src/main/themes/VAADIN/themes/valo/components/_tree8.scss b/themes/src/main/themes/VAADIN/themes/valo/components/_tree8.scss index 8838e7b4e2..1b4405cdbd 100644 --- a/themes/src/main/themes/VAADIN/themes/valo/components/_tree8.scss +++ b/themes/src/main/themes/VAADIN/themes/valo/components/_tree8.scss @@ -1,18 +1,22 @@ @import "treegrid"; -$v-tree8-border-radius: 3px; - -@mixin valo-tree8 ($primary-stylename: v-tree8) { +@mixin valo-tree8($primary-stylename: v-tree8) { @include valo-treegrid($primary-stylename); + $tree-sel-bg: $v-grid-row-selected-background-color; + .#{$primary-stylename} { background-color: transparent; } .#{$primary-stylename}-row > td { background-color: transparent; - border: none; + border: 0; + line-height: 28px; + > * { + vertical-align: baseline; + } } .#{$primary-stylename}-tablewrapper { @@ -20,43 +24,41 @@ $v-tree8-border-radius: 3px; border: none; } - .#{$primary-stylename}-row-selected > .#{$primary-stylename}-cell { - background-color: transparent; - background-image: none; - color: inherit; - text-shadow: none; - border: none; - } - - .#{$primary-stylename}-cell-content { - border: $v-grid-cell-focused-border; - border-color: transparent; - border-radius: $v-tree8-border-radius; - padding: $v-grid-cell-padding; - } - - .#{$primary-stylename}:focus .#{$primary-stylename}-row-focused:before { - display: none; + .#{$primary-stylename}-row { + &::before { + content: ""; + display: none; + position: absolute; + top: 0; + left: 0; + box-sizing: border-box; + width: 100%; + height: 100%; + border-radius: $v-border-radius; + pointer-events: none; + border-width: 1px; + } } - .#{$primary-stylename}:focus .#{$primary-stylename}-cell-focused - > .#{$primary-stylename}-node > .#{$primary-stylename}-cell-content { - border: $v-grid-cell-focused-border; + .#{$primary-stylename}-cell { + position: relative; } // Selected .#{$primary-stylename}-row-selected { - $grid-sel-bg: $v-grid-row-selected-background-color; - > .#{$primary-stylename}-cell > .#{$primary-stylename}-node > .#{$primary-stylename}-cell-content { - @include valo-gradient($grid-sel-bg); - color: valo-font-color($grid-sel-bg); - text-shadow: valo-text-shadow($font-color: valo-font-color($grid-sel-bg), $background-color: $grid-sel-bg); - border-color: adjust-color($grid-sel-bg, $lightness: -8%, $saturation: -8%); + > .#{$primary-stylename}-cell { + background: transparent; } - > .#{$primary-stylename}-cell-focused > .#{$primary-stylename}-node > .#{$primary-stylename}-cell-content { - border-color: adjust-color($grid-sel-bg, $lightness: 20%); + &::before { + display: block; + @include valo-gradient($tree-sel-bg); } } + + .#{$primary-stylename}:focus .#{$primary-stylename}-row-selected.#{$primary-stylename}-row-focused::before { + border-color: transparent; + box-shadow: inset 0 0 0 1px valo-font-color($tree-sel-bg); + } } |