Skip to content

Commit

Permalink
Improved display of export options
Browse files Browse the repository at this point in the history
Using the same layout as the global options.
  • Loading branch information
felixgirault committed Apr 20, 2024
1 parent 4e0f3b5 commit 34cbeaf
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 19 deletions.
3 changes: 3 additions & 0 deletions src/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,9 @@ input[type='range'] {
.data-options {
position: sticky;
top: 1rem;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(28ch, 1fr));
gap: 1rem;
min-width: 20ch;
}

Expand Down
3 changes: 0 additions & 3 deletions src/lib/components/combinations/Combinations.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@

<style>
.data-options {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(28ch, 1fr));
gap: 1rem;
animation: slide-up 250ms ease-out;
contain: layout;
}
Expand Down
36 changes: 20 additions & 16 deletions src/lib/components/export/Export.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -183,25 +183,29 @@
</div>
</fieldset>

<label for="prefix">Variables prefix</label>
<input
id="prefix"
name="prefix"
type="text"
bind:value={$exportPrefix}
/>
<div>
<label for="prefix">Variables prefix</label>
<input
id="prefix"
name="prefix"
type="text"
bind:value={$exportPrefix}
/>
</div>
{/if}

{#if $exportFormat !== 'tokens' && $exportColorFormat !== 'hex' && $exportColorFormat !== 'rgb'}
<label for="precision">Precision</label>
<input
id="precision"
name="precision"
type="number"
min={0}
max={5}
bind:value={$exportPrecision}
/>
<div>
<label for="precision">Precision</label>
<input
id="precision"
name="precision"
type="number"
min={0}
max={5}
bind:value={$exportPrecision}
/>
</div>
{/if}
</div>
</div>
Expand Down

0 comments on commit 34cbeaf

Please sign in to comment.