Skip to content

Commit eb53d01

Browse files
committed
[design] improve form select arrow
1 parent 7bcc624 commit eb53d01

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

‎src/css/form.css‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ label.disabled{
1919
select{
2020
background-color:rgb(var(--form-input-background));
2121
background-image:
22-
linear-gradient(45deg, transparent 50%,rgb(var(--form-label)) 50%),
23-
linear-gradient(135deg,rgb(var(--form-label)) 50%, transparent 50%);
22+
linear-gradient(45deg, transparent 60%,rgb(var(--form-label)) 60%),
23+
linear-gradient(135deg,rgb(var(--form-label)) 40%, transparent 40%);
2424
background-position:
25-
calc(100%-calc(var(--form-arrow-size) *5)) 50%,
26-
calc(100%-calc(var(--form-arrow-size) *4)) 50%;
25+
calc(100%-calc(var(--form-arrow-size) *4)) 50%,
26+
calc(100%-calc(var(--form-arrow-size) *3)) 50%;
2727
background-size:
28-
var(--form-arrow-size) var(--form-arrow-size),
29-
var(--form-arrow-size) var(--form-arrow-size);
28+
var(--form-arrow-size) calc(var(--form-arrow-size) *0.75),
29+
var(--form-arrow-size) calc(var(--form-arrow-size) *0.75);
3030
background-repeat: no-repeat;
31-
padding:0calc(var(--form-arrow-size) *10) 01em;
31+
padding:0calc(var(--form-arrow-size) *8) 01em;
3232
margin:001em0;
3333
color:rgb(var(--form-label));
3434
font-size:1em;
@@ -49,8 +49,8 @@ select{
4949

5050
select:hover{
5151
background-image:
52-
linear-gradient(45deg, transparent 50%,rgb(var(--form-label-hover)) 50%),
53-
linear-gradient(135deg,rgb(var(--form-label-hover)) 50%, transparent 50%);
52+
linear-gradient(45deg, transparent 60%,rgb(var(--form-label-hover)) 60%),
53+
linear-gradient(135deg,rgb(var(--form-label-hover)) 40%, transparent 40%);
5454
background-color:rgb(var(--form-input-background-hover));
5555
border-color:rgb(var(--form-input-border-hover));
5656
color:rgb(var(--form-label-hover));
@@ -61,8 +61,8 @@ select:hover{
6161
select:focus,
6262
select:active{
6363
background-image:
64-
linear-gradient(45deg, transparent 50%,rgb(var(--form-label-hover)) 50%),
65-
linear-gradient(135deg,rgb(var(--form-label-hover)) 50%, transparent 50%);
64+
linear-gradient(45deg, transparent 60%,rgb(var(--form-label-focus-active)) 60%),
65+
linear-gradient(135deg,rgb(var(--form-label-focus-active)) 40%, transparent 40%);
6666
background-color:rgb(var(--form-input-background-border-focus-active));
6767
border-color:rgb(var(--form-input-border-focus-active));
6868
color:rgb(var(--form-label-focus-active));

‎src/css/variables.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
--form-grid-border-checked:var(--theme-accent);
149149
--form-grid-border-disabled:var(--theme-gray-04);
150150
--form-dropdown-background:var(--theme-gray-02);
151-
--form-arrow-size:5px;
151+
--form-arrow-size:calc(var(--theme-root-font-size) *0.5);
152152
--form-hover-ring:000var(--layout-line-width) rgb(var(--theme-gray-06));
153153
--form-focus-ring:000var(--layout-line-width) rgb(var(--theme-gray-10)),000calc(var(--layout-line-width) *2) rgba(var(--theme-gray-10),0.25);
154154
--form-focus-ring-accent:000var(--layout-line-width) rgb(var(--theme-accent)),000calc(var(--layout-line-width) *2) rgba(var(--theme-accent),0.25);

0 commit comments

Comments
(0)