more styling to layer toggle.

This commit is contained in:
Saman Bemel-Benrud
2012-12-07 19:14:12 -05:00
parent 605c793806
commit 1676744a92
3 changed files with 41 additions and 20 deletions
+31 -16
View File
@@ -2,7 +2,7 @@
------------------------------------------------------- */
body {
font:normal 12px/20px 'Helvetica Neue', Arial, sans-serif;
font:normal 14px/20px 'Helvetica Neue', Arial, sans-serif;
margin:0;
padding:0;
color:#222;
@@ -37,11 +37,11 @@ p {
}
a:visited, a {
color: #345692;
color: #b0b0b0;
}
a:hover {
color:#000;
color:#222222;
}
table th {
@@ -61,12 +61,22 @@ input[type=text]:focus {
/* UI Lists
------------------------------------------------------- */
ul.list-toggle {
border-bottom: 1px solid #CCC;
ul.toggle-list {
}
ul.toggle-list li a {
font-weight: bold;
padding: 10px;
border-top: 1px solid #CCC;
display:block;
}
ul.toggle-list li a:hover {
background: #ececec;
}
a.selected {
background:#DDE4FF;
color:#222;
}
/* Utility Classes
@@ -78,6 +88,7 @@ a.selected {
background-color: #222222;
color: white;
}
div.hide {
display:none;
}
@@ -346,6 +357,12 @@ button.Browse .label {
background-image: url(/img/sprite.png);
}
.content {
background:#fff;
border-radius: 4px;
border: 1px solid #ccc;
}
/* Zoomer */
.zoombuttons {
@@ -375,22 +392,20 @@ button.Browse .label {
}
.layerswitcher-control .content {
background:#fff;
padding:5px;
width: 150px;
position:absolute;
left:40px;
width:100px;
left:50px;
top:0;
}
.layerswitcher-control .opacity-options {
border:1px solid #000;
height:15px;
width:45px;
.opacity-options-wrapper {
padding: 10px;
}
.layerswitcher-control a.layer {
display:block;
.opacity-options {
border:1px solid #000;
height:15px;
width:100px;
}
.layerswitcher-control a.opacity {
+1 -1
View File
@@ -46,7 +46,7 @@ table {
border-collapse: collapse;
border-spacing: 0;
}
a { text-decoration: none;}
/*
* 1. Corrects font family not being inherited in all browsers.
* 2. Corrects font size not being inherited in all browsers.
+9 -3
View File
@@ -24,9 +24,11 @@ iD.layerswitcher = function(map) {
});
var content = selection
.append('div').attr('class', 'content hide');
.append('div').attr('class', 'content map-overlay hide');
opa = content.append('div')
opa = content
.append('div')
.attr('class', 'opacity-options-wrapper')
.append('ul')
.attr('class', 'opacity-options')
.selectAll('a.opacity')
@@ -61,7 +63,11 @@ iD.layerswitcher = function(map) {
});
}
content.append('ul').selectAll('a.layer')
content
.append('ul')
.attr('class', 'toggle-list')
.selectAll('a.layer')
.data(sources)
.enter()
.append('li')