Skip to content

Commit 17667f7

Browse files
committed
Impove color picker on firefox
1 parent a3a4d17 commit 17667f7

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

docs/welcome/index.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<title>pace.js</title>
1212
<link rel="icon" href="http://static.hubspot.com/favicon.ico">
1313
<script type="text/javascript" src="//use.typekit.net/jbn8qxr.js"></script>
14+
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
1415
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
1516
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
1617
<script src="/pace/docs/lib/color.js"></script>
@@ -282,6 +283,7 @@
282283
input[type="color"] {
283284
width: 15rem;
284285
height: 2.3rem;
286+
font-size: 1rem;
285287
position: relative;
286288
font-family: inherit;
287289
cursor: pointer;
@@ -362,6 +364,9 @@
362364
.block {
363365
padding: 10px 0;
364366
}
367+
.color-label {
368+
display: none;
369+
}
365370
</style>
366371

367372
<div class="section colored">
@@ -387,7 +392,8 @@ <h2>Download</h2>
387392
<p><a class="button" href="https://raw.github.com/HubSpot/pace/v0.4.2/pace.min.js">Pace.js</a></p>
388393
<br/>
389394
<h2>Themes</h2>
390-
<input type="color" value="#2299dd"></input>
395+
<label class="color-label" for="color-select">Enter a color:</label>
396+
<input type="color" value="#2299dd" id="color-select"></input>
391397
<div class="themes"></div>
392398
<p class="block">Submit a theme! <a href="https://github.com/HubSpot/pace">Fork us on GitHub</a></p>
393399
<p class="block"><a class="button" href="http://github.hubspot.com/pace/">Documentation</a></p>
@@ -397,6 +403,9 @@ <h2>Themes</h2>
397403
<br/>
398404
<script>
399405
$(function(){
406+
if (!Modernizr.inputtypes.color)
407+
$('.color-label').show();
408+
400409
var themes = [{
401410
name: 'minimal',
402411
title: 'Minimal',

themes/pace-theme-corner-indicator.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
.pace .pace-activity::before,
3232
.pace .pace-activity::after {
3333
position: absolute;
34-
bottom: 24px;
34+
bottom: 30px;
3535
left: 50%;
3636
display: block;
3737
border: 5px solid #fff;
@@ -40,7 +40,7 @@
4040
}
4141

4242
.pace .pace-activity::before {
43-
margin-left: -46px;
43+
margin-left: -40px;
4444
width: 80px;
4545
height: 80px;
4646
border-right-color: rgba(0, 0, 0, .2);
@@ -50,8 +50,8 @@
5050
}
5151

5252
.pace .pace-activity::after {
53-
bottom: 45px;
54-
margin-left: -26px;
53+
bottom: 50px;
54+
margin-left: -20px;
5555
width: 40px;
5656
height: 40px;
5757
border-top-color: rgba(0, 0, 0, .2);

0 commit comments

Comments
 (0)