-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
259 lines (250 loc) · 9.02 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="range-input.css is a tool that allows you to easily generate CSS to style range inputs that look consistent across all browsers. "
/>
<script
defer
data-domain="range-input-css.netlify.app"
src="https://plausible.io/js/plausible.js"
></script>
<link rel="stylesheet" href="css/mvp.css" />
<link rel="stylesheet" href="css/range.css" />
<link rel="stylesheet" href="css/styles.css" />
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png" />
<link rel="manifest" href="site.webmanifest" />
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://range-input-css.netlify.app/">
<meta property="og:title" content="range-input.css - Range Input CSS Generator">
<meta property="og:description" content="Generate CSS to style range inputs that look consistent across all browsers">
<meta property="og:image" content="https://raw.githubusercontent.com/Cool-Runningz/range-input.css/main/images/range-input-css-headline.jpeg">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://range-input-css.netlify.app/">
<meta property="twitter:title" content="range-input.css - Range Input CSS Generator">
<meta property="twitter:description" content="Generate CSS to style range inputs that look consistent across all browsers">
<meta property="twitter:image" content="https://raw.githubusercontent.com/Cool-Runningz/range-input.css/main/images/range-input-css-headline.jpeg">
<!--Share on Twitter widget-->
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<!-- Primary Meta Tags -->
<meta name="title" content="range-input.css - Range Input CSS Generator">
<meta name="description" content="Generate CSS to style range inputs that look consistent across all browsers">
<title>range-input.css - Range Input CSS Generator</title>
</head>
<body>
<header>
<div class="triangle-top-right"></div>
<a
href="https://github.com/Cool-Runningz/range-input.css"
target="_blank"
rel="noopener noreferrer"
>
<img
style="width: 3.25rem"
src="images/GitHub-Mark-Light.png"
alt="View Github Repository"
/>
</a>
<nav>
<a
href="https://twitter.com/share?ref_src=twsrc%5Etfw"
data-size="large"
data-url="https://range-input-css.netlify.app/"
class="twitter-share-button"
data-text="Check out range-input.css"
data-via="alyssa_codes"
data-show-count="false">
Tweet
</a>
<ul>
<li><a href="#about">About this Project</a></li>
</ul>
</nav>
<h1>range-input.css 🎨</h1>
<div class="flex-container-center">
<p class="sub-description">
Generate CSS to style range inputs that look consistent across all
browsers
</p>
</div>
</header>
<main>
<section>
<div id="range-input-container">
<label class="hide-label" for="range-input"> Demo Range Input </label>
<input type="range" id="range-input" />
</div>
</section>
<section>
<article id="card-track">
<h2>Track Styles</h2>
<div class="flex">
<label for="track-color">Color: </label>
<input type="color" id="track-color" value="#ADD8E6" />
</div>
<div class="flex">
<label for="track-width"> Width: </label>
<input
type="number"
id="track-width"
min="0"
value="25"
step="0.5"
/>
<label class="hide-label" for="track-width-unit"
>Choose a width unit:</label
>
<select id="track-width-unit">
<option value="rem">rem</option>
<option value="px">px</option>
<option value="%">%</option>
</select>
</div>
<div class="flex">
<label for="track-height"> Height: </label>
<input
type="number"
id="track-height"
min="0"
step="0.5"
value="0.5"
/>
<label class="hide-label" for="track-height-unit"
>Choose a height unit:</label
>
<select id="track-height-unit">
<option value="rem">rem</option>
<option value="px">px</option>
</select>
</div>
<div class="flex">
<label for="track-border-radius">Border-radius: </label>
<input
type="number"
id="track-border-radius"
min="0"
step="0.5"
value="0.5"
/>
<label class="hide-label" for="track-border-radius-unit"
>Choose a border-radius unit:</label
>
<select id="track-border-radius-unit">
<option value="rem">rem</option>
<option value="px">px</option>
<option value="%">%</option>
</select>
</div>
<p>
<small>
*The track is the element that the thumb runs along.
</small>
</p>
</article>
<article id="card-thumb">
<h2>Thumb Styles</h2>
<div class="flex">
<label for="thumb-color">Color: </label>
<input type="color" id="thumb-color" value="#808080" />
</div>
<div class="flex">
<label for="thumb-width"> Width: </label>
<input
type="number"
id="thumb-width"
min="0"
value="1"
step="0.5"
/>
<label class="hide-label" for="thumb-width-unit"
>Choose a width unit:</label
>
<select id="thumb-width-unit">
<option value="rem">rem</option>
<option value="px">px</option>
<option value="%">%</option>
</select>
</div>
<div class="flex">
<label for="thumb-height"> Height: </label>
<input
type="number"
id="thumb-height"
min="0"
step="0.5"
value="1"
/>
<label class="hide-label" for="thumb-height-unit"
>Choose a height unit:</label
>
<select id="thumb-height-unit">
<option value="rem">rem</option>
<option value="px">px</option>
</select>
</div>
<div class="flex">
<label for="thumb-border-radius">Border-radius: </label>
<input
type="number"
id="thumb-border-radius"
min="0"
step="0.5"
value="0.5"
/>
<label class="hide-label" for="thumb-border-radius-unit"
>Choose a border-radius unit:</label
>
<select id="thumb-border-radius-unit">
<option value="rem">rem</option>
<option value="px">px</option>
<option value="%">%</option>
</select>
</div>
<p>
<small>*The thumb is used to select varying range values.</small>
</p>
</article>
</section>
<section>
<div id="code-container">
<pre>
<button id="copy-btn" data-tooltip="Copied!">Copy</button>
<code tabindex="0">
</code>
</pre>
</div>
</section>
<hr />
<details id="about" open>
<summary>About this Project</summary>
<p>
Range inputs have notoriously been a pain to style. Each browser
renders the input differently requiring you to use vendor prefixes in
order to create a cohesive look and feel. To speed up the process, I
created this tool to make it easier for you to create custom range
inputs that will look awesome and consistent across all browsers!
</p>
<p>
🔖 To learn more, check out my
<a
href="https://www.smashingmagazine.com/2021/12/create-custom-range-input-consistent-browsers/"
target="_blank"
rel="noopener noreferrer"
>
Smashing Magazine article
</a>
describing the quirkiness of the range input.
</p>
</details>
</main>
</body>
<script src="js/scripts.js"></script>
</html>