Use border-box everywhere and use svelte loop keying

This commit is contained in:
2021-11-27 10:16:32 +01:00
parent a7b98f3b5d
commit b7038be202
14 changed files with 10 additions and 42 deletions

View File

@@ -110,7 +110,7 @@ const drop = (e, index) => {
</script>
<div class="gallery">
{#each list.files as file, index (file)}
{#each list.files as file, index (file.id)}
<div
class="file"
on:click={() => {click_file(index)}}
@@ -148,16 +148,14 @@ const drop = (e, index) => {
<style>
.gallery{
padding: 16px;
box-sizing: border-box;
width: 100%;
height: 100%;
overflow: auto;
}
.file{
position: relative;
box-sizing: border-box;
width: 200px;
max-width: 40%;
max-width: 45%;
height: 200px;
margin: 8px;
padding: 0;