sanic/static/treeview.css

151 lines
2.4 KiB
CSS
Raw Permalink Normal View History

2024-02-15 02:16:27 +01:00
/* https://codepen.io/defims/pen/DBaVXM */
2024-02-15 02:16:27 +01:00
ul {
float: left;
clear: left;
margin-left: .25em;
padding: 0;
}
2024-02-15 02:16:27 +01:00
ul:before {
content:"";
position: absolute;
z-index: 1;
top:.25em;
right:auto;
bottom:0;
left: 1.75em;
margin: auto;
/* border-right: dotted white .1em; */
width: 0;
height: auto;
}
2024-02-15 02:16:27 +01:00
ul:after {
content: "-";
position: absolute;
z-index: 3;
top: 0;
left: -.5em;
margin-left: .65em;
margin-top: .15em;
padding: 0;
width: .8em;
height: .8em;
text-align: center;
line-height: .7em;
font-size: 1em;
}
2024-02-15 02:16:27 +01:00
ul > li {
display: block;
position: relative;
float: left;
clear: both;
right:auto;
padding-left: 1em;
width:auto;
text-align: center;
color:white;
}
2024-02-15 02:16:27 +01:00
ul > li > input[type=checkbox] {
display:block;
position: absolute;
float: left;
z-index: 4;
margin: 0 0 0 -1em;
padding: 0;
width:1em;
height: 2em;
font-size: 1em;
opacity: 0;
cursor: pointer;
}
2024-02-15 02:16:27 +01:00
ul > li > input[type=checkbox]:not(:checked)~ul:before {
display: none;
}
2024-02-15 02:16:27 +01:00
ul > li > input[type=checkbox]:not(:checked)~ul:after {
content: "+"
}
2024-02-15 02:16:27 +01:00
ul > li > input[type=checkbox]:not(:checked)~ul * {
display: none;
}
2024-02-15 02:16:27 +01:00
ul > li > span {
display: block;
position: relative;
float: left;
z-index: 3;
margin-left: .25em;
padding-left: .25em;
}
2024-02-15 02:16:27 +01:00
ul > li > span:after {
content: "";
display: block;
position: absolute;
left:-1em;
top:0;
bottom:0;
margin: auto .25em auto .25em;
/* border-top: dotted white .1em; */
width: .75em;
height: 0;
}
2024-02-15 02:16:27 +01:00
ul > li:last-child:before {
content: ""; display: block; position: absolute; z-index: 2;
top:1em; left:0; bottom:-.25em;
width:.75em; height:auto;
}
2024-02-15 02:16:27 +01:00
#tree {
position: relative; font-family: "Georgia";
}
2024-02-15 02:16:27 +01:00
#tree:before {
left:.5em;
}
2024-02-15 02:16:27 +01:00
#tree:after {
display: none;
}
2024-02-15 02:16:27 +01:00
/* decoration */
ul, ul > li:last-child:before {
background: transparent;
}
2024-02-15 02:16:27 +01:00
ul > li {
background: transparent;
}
2024-02-15 02:16:27 +01:00
ul:after {
background: linear-gradient(135deg, rgba(255,255,255,1), rgba(195,186,170,1));
color: black;
border:solid gray 1px;
border-radius: .1em;
}
2024-02-15 02:16:27 +01:00
ul > li > span {
border-radius: .25em;
color: white;
}
2024-02-15 02:16:27 +01:00
ul > li > input[type=checkbox]~span:before {
content:""; display: inline-block;
margin: 0 .25em 0 0;
width:1em; height: 1em; ;line-height: 1em;
content: '\1F4C1';
2024-02-15 02:16:27 +01:00
background-repeat:no-repeat;
background-size:contain;
}
2024-02-15 02:16:27 +01:00
ul > li > input[type=checkbox]:checked~span:before {
content: '\1F4C2';
}