Skip to content

Commit

Permalink
Make color picker elements round
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines committed Nov 13, 2023
1 parent 921ee6a commit f95295c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions app/assets/stylesheets/annotations.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
&:checked + label {
span {
transform: scale(1.25);
border: 2px solid black;
border: 2px solid #0000008a;
}
}
}
Expand All @@ -109,16 +109,19 @@
height: 25px;
margin-right: 2px;
cursor: pointer;

&:hover {
span {
transform: scale(1.25);
}
}

span {
display: block;
width: 100%;
height: 100%;
transition: transform .2s ease-in-out;
border-radius: 50%;
transition: transform .1s ease-in-out;
}
}
}
2 changes: 1 addition & 1 deletion app/views/annotations/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<%= f.label :color,
"annotation_color#{i}",
for: "annotation_color#{i}" do %>
<span class="annotation_color<%=i%>",
<span class="annotation_color<%=i%>"
style="background: <%= colors[i] %>;"></span>
<% end %>
<% end %>
Expand Down

0 comments on commit f95295c

Please sign in to comment.