Skip to content

Commit

Permalink
fix initial color value
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Oct 12, 2021
1 parent b8625c1 commit 674d711
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {createText} from "./text.js";

export function color({
label,
value = "#000000",
value,
required,
datalist,
readonly,
Expand All @@ -20,6 +20,7 @@ export function color({
const input = html`<input
type=color
name=text
value=${value}
id=${id}
list=${listId}
readonly=${readonly}
Expand Down
2 changes: 1 addition & 1 deletion test/output/colorValue.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<form class="__ns__">
<div class="__ns__-input">
<div class="__ns__-input"><input type="color" name="text" id="__ns__-1"><output for="__ns__-1">#000000</output></div>
<div class="__ns__-input"><input type="color" name="text" value="#00ff00" id="__ns__-1"><output for="__ns__-1">#00ff00</output></div>
</div>
</form>

0 comments on commit 674d711

Please sign in to comment.