Created
April 26, 2018 09:48
-
-
Save shameen/b6edc56efc18754fa068401600a9bef8 to your computer and use it in GitHub Desktop.
Kendo UI TreeView dotted styling (like Windows)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Kendo UI TreeView: https://demos.telerik.com/kendo-ui/treeview | |
* Measurements based on the default "Material" theme as of April 2018, should be easily adjustable for other themes. | |
*/ | |
.k-treeview .k-item[data-expanded="true"] { overflow:hidden;position:relative; } | |
.k-treeview .k-item[data-expanded="true"]:before { | |
content:''; | |
position:absolute; | |
top:2em; | |
bottom:1.2em; | |
left:1.75em; | |
border-left: dotted 1px #AAA; | |
} | |
/* prevent dotted line overlapping icons, will cause issues if using a non-white background */ | |
.k-treeview .k-item .k-icon { | |
background:white; | |
} | |
/* Move checkboxes down a bit */ | |
.k-treeview .k-item .k-checkbox-label { | |
vertical-align: text-top; | |
} | |
/* Horizontal dotted line between vertical and the item. | |
":only-child" filters to 'Leafs' (nodes without children) */ | |
.k-treeview .k-item > div:only-child {position:relative;} | |
.k-treeview .k-item > div:only-child:before { | |
content:''; | |
position:absolute; | |
top:50%; | |
width:0.5em; | |
right:100%; | |
border-top:dotted 1px #AAA; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment