From 5e586419faa14f5fe4523f59cf656d41c707a975 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Tue, 12 Feb 2019 16:29:52 -0500 Subject: [PATCH] Remove unnecessary float styles and cleanup CSS in the preset list --- css/80_app.css | 13 +++++++++---- modules/ui/preset_list.js | 10 +++++----- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/css/80_app.css b/css/80_app.css index d3344ef55..674b6e9a4 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -919,9 +919,12 @@ a.hide-toggle { border-bottom: 1px solid #ccc; } +.preset-list-item { + margin-bottom: 10px; +} + .preset-list-button-wrap { position: relative; - margin-bottom: 10px; height: 60px; display: flex; } @@ -1152,13 +1155,16 @@ img.tag-reference-wiki-image { } .subgrid .preset-list { - padding: 10px 10px 0 10px; + padding: 10px; margin-top: 0; border: 0; border-radius: 8px; width: -webkit-calc(100% + 20px); margin-left: -10px; } +.subgrid .preset-list > *:last-child { + margin-bottom: 0; +} .subgrid .arrow { border: solid rgba(0, 0, 0, 0); @@ -1168,7 +1174,6 @@ img.tag-reference-wiki-image { height: 0; margin-left: 50%; margin-left: -webkit-calc(50% - 10px); - margin-top: -10px; } @@ -1208,7 +1213,7 @@ img.tag-reference-wiki-image { .preset-editor .form-fields-container:empty { display: none; } -.entity-editor-pane .preset-list-item .preset-list-button-wrap { +.entity-editor-pane .preset-list-item { margin-bottom: 0; } diff --git a/modules/ui/preset_list.js b/modules/ui/preset_list.js index 76260d2fe..b48992382 100644 --- a/modules/ui/preset_list.js +++ b/modules/ui/preset_list.js @@ -254,7 +254,7 @@ export function uiPresetList(context) { function item(selection) { var wrap = selection.append('div') - .attr('class', 'preset-list-button-wrap category col12'); + .attr('class', 'preset-list-button-wrap category'); function click() { var isExpanded = d3_select(this).classed('expanded'); @@ -313,7 +313,7 @@ export function uiPresetList(context) { .html(function() { return preset.name() + '…'; }); box = selection.append('div') - .attr('class', 'subgrid col12') + .attr('class', 'subgrid') .style('max-height', '0px') .style('opacity', 0); @@ -321,7 +321,7 @@ export function uiPresetList(context) { .attr('class', 'arrow'); sublist = box.append('div') - .attr('class', 'preset-list fillL3 cf fl'); + .attr('class', 'preset-list fillL3'); } @@ -342,7 +342,7 @@ export function uiPresetList(context) { .duration(200) .style('opacity', '1') .style('max-height', 200 + preset.members.collection.length * 190 + 'px') - .style('padding-bottom', '20px'); + .style('padding-bottom', '10px'); } }; @@ -354,7 +354,7 @@ export function uiPresetList(context) { function PresetItem(preset) { function item(selection) { var wrap = selection.append('div') - .attr('class', 'preset-list-button-wrap col12'); + .attr('class', 'preset-list-button-wrap'); var button = wrap.append('button') .attr('class', 'preset-list-button')