Draw states after districts; add 'fill: none' CSS to states; store a map of color to all features with that color
This commit is contained in:
12
index.html
12
index.html
@@ -21,17 +21,23 @@
|
||||
padding: 2em;
|
||||
}
|
||||
.state {
|
||||
stroke: black;
|
||||
fill: none;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
.district {
|
||||
stroke: white;
|
||||
stroke-width: 0.5;
|
||||
transition: fill 0.3s;
|
||||
}
|
||||
.state:hover {
|
||||
.district:hover {
|
||||
stroke-width: 1.5;
|
||||
}
|
||||
.stateText {
|
||||
.districtText {
|
||||
visibility: hidden;
|
||||
}
|
||||
.state:hover ~ .stateText {
|
||||
.district:hover ~ .districtText {
|
||||
visibility: visible;
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user