make component removal work in firefox

pull/2196/head
Richard Harris 7 years ago
parent a6e745a780
commit 0bf61761d9

@ -83,7 +83,6 @@
.file-tabs { .file-tabs {
border: none; border: none;
padding: 0 0 0 5rem;
margin: 0; margin: 0;
white-space: nowrap; white-space: nowrap;
overflow-x: auto; overflow-x: auto;
@ -91,16 +90,17 @@
height: 10em; height: 10em;
} }
.file-tabs button { .file-tabs .button, .file-tabs button {
position: relative; position: relative;
display: inline-block;
font: 400 1.2rem/1.5 var(--font); font: 400 1.2rem/1.5 var(--font);
border-bottom: var(--border-w) solid transparent; border-bottom: var(--border-w) solid transparent;
padding: 1.2rem 1.2rem 0.8rem 0.5rem; padding: 1.2rem 1.4rem 0.8rem 0.8rem;
margin: 0 0.5rem 0 0; margin: 0 0.5rem 0 0;
color: #999; color: #999;
} }
.file-tabs button.active { .file-tabs .button.active {
/* color: var(--second); */ /* color: var(--second); */
color: #333; color: #333;
border-bottom: var(--border-w) solid var(--prime); border-bottom: var(--border-w) solid var(--prime);
@ -119,10 +119,8 @@
input { input {
position: absolute; position: absolute;
width: 100%; width: 100%;
left: 0.5rem; left: 0.8rem;
top: 1.2rem; top: 1.2rem;
/* padding: 0 0.4rem; */
/* font-size: 1rem; */
font: 400 1.2rem/1.5 var(--font); font: 400 1.2rem/1.5 var(--font);
border: none; border: none;
color: var(--flash); color: var(--flash);
@ -131,14 +129,6 @@
background-color: transparent; background-color: transparent;
} }
.editable {
/* margin-right: 2.4rem; */
}
.uneditable {
/* padding-left: 1.2rem; */
}
.remove { .remove {
position: absolute; position: absolute;
display: none; display: none;
@ -155,36 +145,38 @@
color: var(--flash); color: var(--flash);
} }
.file-tabs button.active .editable { .file-tabs .button.active .editable {
cursor: text; cursor: text;
} }
.file-tabs button.active .remove { .file-tabs .button.active .remove {
display: inline-block; display: block;
} }
.add-new { .add-new {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
width: 5rem; padding: 1.2rem 1rem 0.8rem 0 !important;
height: 100%; height: 4.2rem;
text-align: center; text-align: center;
background-color: white; background-color: white;
} }
.add-new:hover { .add-new:hover {
color: var(--flash); color: var(--flash) !important;
} }
</style> </style>
<div class="component-selector"> <div class="component-selector">
{#if $components.length}
<div class="file-tabs" on:dblclick="{addNew}"> <div class="file-tabs" on:dblclick="{addNew}">
{#each $components as component} {#each $components as component}
<button <div
id={component.name} id={component.name}
class="button"
role="button"
class:active="{component === $selected}" class:active="{component === $selected}"
data-name={component.name}
on:click="{() => selectComponent(component)}" on:click="{() => selectComponent(component)}"
on:dblclick="{e => e.stopPropagation()}" on:dblclick="{e => e.stopPropagation()}"
> >
@ -198,6 +190,7 @@
<input <input
autofocus autofocus
spellcheck={false}
bind:value={editing.name} bind:value={editing.name}
on:focus={selectInput} on:focus={selectInput}
on:blur="{() => closeEdit()}" on:blur="{() => closeEdit()}"
@ -218,11 +211,12 @@
</span> </span>
{/if} {/if}
{/if} {/if}
</button>
{/each}
</div> </div>
{/each}
<button class="add-new" on:click={addNew} title="add new component"> <button class="add-new" on:click={addNew} title="add new component">
<Icon name="plus" /> <Icon name="plus" />
</button> </button>
</div>
{/if}
</div> </div>

Loading…
Cancel
Save