Skip to content

Commit

Permalink
default in colors
Browse files Browse the repository at this point in the history
  • Loading branch information
b1conrad committed Jun 2, 2022
1 parent 254ae8f commit 7685ec9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions krl/css3colors.krl
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ ruleset css3colors {
t_i == "Number" => indent.between(0,40).as_spaces() |
""
}
options = function(indent){
options = function(indent,default){
left_margin = indent.as_margin()
gen_option = function(v,k){
<<#{left_margin}<option value="#{v}">#{k}</option>
<<#{left_margin}<option value="#{v}"#{k==default => " selected" | ""}>#{k}</option>
>>
}
colormap.map(gen_option).values().join("")
Expand Down

1 comment on commit 7685ec9

@b1conrad
Copy link
Owner Author

@b1conrad b1conrad commented on 7685ec9 Jun 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the options function here identical to the one in the ruleset which ought to be using this one as a module. See issue #77 in the byname repo.

Please sign in to comment.