Files
sesaman/BBoney/doc/tree-diagrm/style.scss
louiscklaw 22008233b9 update,
2025-02-01 02:05:25 +08:00

152 lines
2.8 KiB
SCSS

//------- {{ Variables }} -------//
$white: rgb(245, 245, 245);
$bg: rgb(77, 76, 125);
$horizontal-gutter: 100px;
$border-radius: 10px;
$entry-min-height: 80px;
$label-width: 150px;
$label-height: 50px;
$label-padding-y: 5px;
$label-padding-x: 10px;
$label-border-radius: 5px;
$color-navy-1: rgb(54, 48, 98);
$color-navy-2: rgb(77, 76, 125);
$color-orange: rgb(249, 148, 23);
$color-white: rgb(245, 245, 245);
//------- {{ Styles }} -------//
.hidden {
display: none;
}
.highlight {
color: $color-white;
background-color: $color-orange
}
.label_text {
}
*, *:before, *:after {
font-family: 'Noto Sans TC', sans-serif;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
body {
min-width: 1200px;
margin: 0;
padding: 50px;
color: $white;
font: 16px Verdana, sans-serif;
background: $color-navy-1;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.container {
padding: 1rem;
}
#wrapper {
position: relative;
}
.branch {
position: relative;
margin-left: $horizontal-gutter + $label-width;
&:before {
content: "";
width: calc($horizontal-gutter / 2);
border-top: 2px solid $white;
position: absolute;
left: -$horizontal-gutter;
top: 50%;
margin-top: 1px;
}
}
.entry {
position: relative;
min-height: $entry-min-height;
&:before {
content: "";
height: 100%;
border-left: 2px solid $white;
position: absolute;
left: -(calc( $horizontal-gutter / 2 ));
}
&:after {
content: "";
width: calc( $horizontal-gutter / 2 );
border-top: 2px solid $white;
position: absolute;
left: -(calc( $horizontal-gutter / 2 ));
top: 50%;
margin-top: 1px;
}
&:first-child {
&:before {
width: $border-radius;
height: 50%;
top: 50%;
margin-top: 2px;
border-radius: $border-radius 0 0 0;
}
&:after {
height: $border-radius;
border-radius: $border-radius 0 0 0;
}
}
&:last-child {
&:before {
width: $border-radius;
height: 50%;
border-radius: 0 0 0 $border-radius;
}
&:after {
height: $border-radius;
border-top: none;
border-bottom: 2px solid $white;
border-radius: 0 0 0 $border-radius;
margin-top: -$border-radius + 1px;
}
}
&.sole {
&:before {
display: none;
}
&:after {
width: calc($horizontal-gutter / 2);
height: 0;
margin-top: 1px;
border-radius: 0;
}
}
}
.label {
display: block;
min-width: $label-width;
padding: $label-padding-y $label-padding-x;
line-height: $label-height - $label-padding-y * 2;
text-align: center;
border: 2px solid $white;
border-radius: $label-border-radius;
position: absolute;
left: 0;
top: 50%;
margin-top: -(calc( $label-height / 2 ));
}