summaryrefslogtreecommitdiffstats
path: root/themes
diff options
context:
space:
mode:
authorAleksi Hietanen <aleksi@vaadin.com>2017-04-26 09:47:13 +0300
committerIlia Motornyi <elmot@vaadin.com>2017-04-26 08:47:13 +0200
commit2e5b49113439310d2dae9ec86fca3ccdf74833f5 (patch)
tree6f634ff2f15c5487da2602f67696866b49f2c0bf /themes
parent38108cb43194117c0f1c8d950917002575946ae4 (diff)
downloadvaadin-framework-2e5b49113439310d2dae9ec86fca3ccdf74833f5.tar.gz
vaadin-framework-2e5b49113439310d2dae9ec86fca3ccdf74833f5.zip
Make TreeGrid follow framework style conventions
Diffstat (limited to 'themes')
-rw-r--r--themes/src/main/themes/VAADIN/themes/valo/components/_all.scss6
-rw-r--r--themes/src/main/themes/VAADIN/themes/valo/components/_treegrid.scss20
-rw-r--r--themes/src/main/themes/VAADIN/themes/valo/shared/_variables.scss1
3 files changed, 16 insertions, 11 deletions
diff --git a/themes/src/main/themes/VAADIN/themes/valo/components/_all.scss b/themes/src/main/themes/VAADIN/themes/valo/components/_all.scss
index 6211d39a92..552d0f035d 100644
--- a/themes/src/main/themes/VAADIN/themes/valo/components/_all.scss
+++ b/themes/src/main/themes/VAADIN/themes/valo/components/_all.scss
@@ -145,8 +145,10 @@
@if v-is-included(tree) {
@include valo-tree;
}
-
- @include treegrid;
+
+ @if v-is-included(treegrid) {
+ @include valo-treegrid;
+ }
@if v-is-included(table) or v-is-included(treetable) {
@include valo-table;
diff --git a/themes/src/main/themes/VAADIN/themes/valo/components/_treegrid.scss b/themes/src/main/themes/VAADIN/themes/valo/components/_treegrid.scss
index 07c8f71d0d..9d06e4a3ef 100644
--- a/themes/src/main/themes/VAADIN/themes/valo/components/_treegrid.scss
+++ b/themes/src/main/themes/VAADIN/themes/valo/components/_treegrid.scss
@@ -1,3 +1,5 @@
+@import "grid";
+
/** Expander button visual - expanded */
$tg-expander-char-expanded: '\f0d7' !default;
@@ -10,10 +12,9 @@ $tg-expander-width: 10px !default;
/** Expander button right side padding */
$tg-expander-padding: 10px !default;
-$v-tree-grid-row-focused-border: $v-grid-cell-focused-border !default;
-
+@mixin valo-treegrid ($primary-stylename: v-treegrid) {
-@mixin treegrid {
+ @include valo-grid($primary-stylename);
// Expander with and item indentation constants
$indent: $tg-expander-width + $tg-expander-padding;
@@ -21,7 +22,7 @@ $v-tree-grid-row-focused-border: $v-grid-cell-focused-border !default;
// Classname for depth styling
$class-depth: depth !default;
- .v-tree-grid-expander {
+ .#{$primary-stylename}-expander {
display: inline-block;
width: $tg-expander-width;
padding-right: $tg-expander-padding;
@@ -53,7 +54,7 @@ $v-tree-grid-row-focused-border: $v-grid-cell-focused-border !default;
}
// Hierarchy depth styling
- .v-tree-grid-node {
+ .#{$primary-stylename}-node {
@for $i from 0 through 15 {
&.#{$class-depth}-#{$i} {
padding-left: $indent * $i;
@@ -62,11 +63,11 @@ $v-tree-grid-row-focused-border: $v-grid-cell-focused-border !default;
}
// Expander and cell content in same line
- .v-tree-grid-cell-content {
+ .#{$primary-stylename}-cell-content {
display: inline-block;
}
- .v-grid-rowmode-row-focused {
+ .#{$primary-stylename}-rowmode-row-focused {
&:before {
content: "";
@@ -80,11 +81,12 @@ $v-tree-grid-row-focused-border: $v-grid-cell-focused-border !default;
pointer-events: none;
}
}
- .v-grid:focus .v-grid-rowmode-row-focused:before {
+
+ .#{$primary-stylename}:focus .#{$primary-stylename}-rowmode-row-focused:before {
display: block;
}
- .v-grid.v-disabled:focus .v-grid-rowmode-row-focused:before {
+ .#{$primary-stylename}.v-disabled:focus .#{$primary-stylename}-rowmode-row-focused:before {
// Disabled Grid should not show cell focus outline
display: none;
}
diff --git a/themes/src/main/themes/VAADIN/themes/valo/shared/_variables.scss b/themes/src/main/themes/VAADIN/themes/valo/shared/_variables.scss
index 4634a71fea..cdeca2dd4b 100644
--- a/themes/src/main/themes/VAADIN/themes/valo/shared/_variables.scss
+++ b/themes/src/main/themes/VAADIN/themes/valo/shared/_variables.scss
@@ -490,6 +490,7 @@ $v-included-components:
textarea,
richtextarea,
tree,
+ treegrid,
treetable,
twincolselect,
upload,