mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Improve combobox option visibility
(closes #4761) This improves the usability of the combobox when it appears over other rows of fields (e.g. raw tag editor) 1. shrink size on left/right to provide more separation from content beneath 2. adjust box shadow for slightly more visibility 3. shrink size of first option by one pixel, so that the combobox options will never perfectly line up with rows that they cover
This commit is contained in:
@@ -1883,7 +1883,7 @@ input[type=number] {
|
||||
div.combobox {
|
||||
z-index: 9999;
|
||||
display: none;
|
||||
box-shadow: 0 0 10px 0 rgba(0,0,0,.1);
|
||||
box-shadow: 0 4px 10px 1px rgba(0,0,0,.2);
|
||||
margin-top: -1px;
|
||||
background: white;
|
||||
max-height: 120px;
|
||||
@@ -1896,7 +1896,7 @@ div.combobox {
|
||||
.combobox a {
|
||||
display: block;
|
||||
padding: 5px 10px;
|
||||
border-top:1px solid #ccc;
|
||||
border-top: 1px solid #ccc;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
@@ -1909,6 +1909,7 @@ div.combobox {
|
||||
|
||||
.combobox a:first-child {
|
||||
border-top: 0;
|
||||
padding: 4px 10px;
|
||||
}
|
||||
|
||||
.combobox-caret {
|
||||
|
||||
@@ -265,8 +265,8 @@ export function d3combobox() {
|
||||
var rect = node.getBoundingClientRect();
|
||||
|
||||
wrapper
|
||||
.style('left', rect.left + 'px')
|
||||
.style('width', rect.width + 'px')
|
||||
.style('left', (rect.left + 5) + 'px')
|
||||
.style('width', (rect.width - 10) + 'px')
|
||||
.style('top', rect.height + rect.top + 'px');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user