mirror of
https://github.com/FoggedLens/iD.git
synced 2026-04-01 09:40:38 +02:00
Fix preset form field spacing
This commit is contained in:
19
css/app.css
19
css/app.css
@@ -914,17 +914,9 @@ a:hover .icon.out-link { background-position: -500px -14px;}
|
||||
background-color: #F6F6F6;
|
||||
}
|
||||
|
||||
.inspector-preset .form-field {
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.inspector-preset .form-field:first-child {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.inspector-preset .form-field:last-child {
|
||||
padding-bottom: 20px;
|
||||
.form-field {
|
||||
margin-bottom: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.form-label {
|
||||
@@ -1026,14 +1018,9 @@ a:hover .icon.out-link { background-position: -500px -14px;}
|
||||
/* adding additional preset fields */
|
||||
|
||||
.more-buttons {
|
||||
margin-top: 20px;
|
||||
border-top: 1px solid #CCC;
|
||||
}
|
||||
|
||||
.more-buttons:nth-last-child(2) {
|
||||
border-bottom: 1px solid #CCC;
|
||||
}
|
||||
|
||||
button.preset-add-field {
|
||||
width: 25%;
|
||||
height: 40px;
|
||||
|
||||
@@ -73,7 +73,13 @@ iD.ui.preset = function(context) {
|
||||
var shown = fields.filter(function(field) { return field.shown(); }),
|
||||
notShown = fields.filter(function(field) { return !field.shown(); });
|
||||
|
||||
var $fields = selection.selectAll('.form-field')
|
||||
var $form = selection.selectAll('form')
|
||||
.data([0]);
|
||||
|
||||
$form.enter().append('form')
|
||||
.attr('class', 'preset-form inspector-inner col12');
|
||||
|
||||
var $fields = $form.selectAll('.form-field')
|
||||
.data(shown, fieldKey);
|
||||
|
||||
// Enter
|
||||
@@ -81,7 +87,7 @@ iD.ui.preset = function(context) {
|
||||
var $enter = $fields.enter()
|
||||
.insert('div', '.more-buttons')
|
||||
.attr('class', function(field) {
|
||||
return 'form-field form-field-' + field.id + ' col12';
|
||||
return 'form-field form-field-' + field.id;
|
||||
});
|
||||
|
||||
var $label = $enter.append('label')
|
||||
|
||||
Reference in New Issue
Block a user