Skip to content

Commit ce747e8

Browse files
committed
refactor: ♻️ Move custom styling for select box to improve appearance in Safari to the CSS file
1 parent a25a4be commit ce747e8

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ <h1 class="text-3xl font-bold text-cyan-400 mb-2">Calendar Proxy</h1>
106106
<div class="flex flex-col sm:flex-row gap-2">
107107
<select
108108
id="uaPreset"
109-
class="flex-1 rounded-lg border-0 bg-slate-800 px-4 py-3 text-slate-100 focus:outline-none focus:ring-2 focus:ring-cyan-500 appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\"%3E%3Cpath stroke=\"%236b7280\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M6 8l4 4 4-4\"/%3E%3C/svg%3E')] bg-[length:1.5em_1.5em] bg-[right_0.5rem_center] bg-no-repeat pr-10"
109+
class="flex-1 rounded-lg border-0 bg-slate-800 px-4 py-3 text-slate-100 focus:outline-none focus:ring-2 focus:ring-cyan-500 select-styled"
110110
>
111111
<option value="">Server default</option>
112112
<option

src/input.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
@import "tailwindcss";
2+
3+
/* Safari select box styling fix */
4+
.select-styled {
5+
appearance: none;
6+
background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"%3E%3Cpath stroke="%236b7280" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6 8l4 4 4-4"/%3E%3C/svg%3E');
7+
background-size: 1.5em 1.5em;
8+
background-position: right 0.5rem center;
9+
background-repeat: no-repeat;
10+
padding-right: 2.5rem;
11+
}

0 commit comments

Comments
 (0)