From 2c93e053aeb21ffbe12a58ecc050e01b506c4213 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 23 Aug 2013 16:51:27 -0700 Subject: [PATCH] Fewer borders for localized names Reduces visual clutter and fixes #1695 --- css/app.css | 8 ++++---- js/id/ui/preset/localized.js | 24 ++++++++++-------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/css/app.css b/css/app.css index 24ad54c7a..ec4ca75d0 100644 --- a/css/app.css +++ b/css/app.css @@ -1453,13 +1453,13 @@ input[type=number] { vertical-align: top; } +.form-field .localized-wrap { + padding: 0 10px; +} + .form-field .localized-wrap .entry { position: relative; overflow: hidden; - background: #f1f1f1; - border: 1px solid #ccc; - border-width: 0; - border-radius: 4px; } .form-field .localized-wrap .entry::before { diff --git a/js/id/ui/preset/localized.js b/js/id/ui/preset/localized.js index 81dc35011..85c48a6b3 100644 --- a/js/id/ui/preset/localized.js +++ b/js/id/ui/preset/localized.js @@ -105,8 +105,8 @@ iD.ui.preset.localized = function(field, context) { var innerWrap = wraps.enter() .insert('div', ':first-child'); - innerWrap.attr('class', 'entry') - .each(function(d) { + innerWrap.attr('class', 'entry') + .each(function() { var wrap = d3.select(this); var langcombo = d3.combobox().fetcher(fetcher); @@ -146,26 +146,22 @@ iD.ui.preset.localized = function(field, context) { .remove(); }) .append('span').attr('class', 'icon delete'); - }); - innerWrap.transition() - .style('margin-top','0px') + innerWrap + .style('margin-top', '0px') .style('max-height', '0px') - .style('padding', '0px') .style('opacity', '0') - .style('border-width', '0px') .transition() .duration(200) - .style('margin-top','10px') - .style('border-width', '1px') - .style('padding', '10px') + .style('margin-top', '10px') .style('max-height', '240px') .style('opacity', '1') - .each('end', function(d) { - d3.select(this).style('max-height', ''); - d3.select(this).style('overflow', 'visible'); - });; + .each('end', function() { + d3.select(this) + .style('max-height', '') + .style('overflow', 'visible'); + }); wraps.exit() .transition()