From 6cb6ba88aa1a634e069261c22f04b15a2c12f12a Mon Sep 17 00:00:00 2001 From: Paul Michael Jarosch Date: Wed, 16 Nov 2016 08:41:16 -0600 Subject: [PATCH 1/2] Update styles to match 2016 browser support --- keys.css | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/keys.css b/keys.css index 69233ff..a097f13 100644 --- a/keys.css +++ b/keys.css @@ -5,20 +5,18 @@ * * Author: Michael Hüneburg * Website: http://michaelhue.com/keyscss + * GitHub: https://github.com/michaelhue/keyscss * License: MIT License (see LICENSE.txt) */ /* Base style, essential for every key. */ kbd, .key { - display: inline; display: inline-block; min-width: 1em; padding: .2em .3em; font: normal .85em/1 "Lucida Grande", Lucida, Arial, sans-serif; text-align: center; text-decoration: none; - -moz-border-radius: .3em; - -webkit-border-radius: .3em; border-radius: .3em; border: none; cursor: default; @@ -32,24 +30,16 @@ kbd[title], .key[title] { /* Dark style for display on light background. This is the default style. */ kbd, kbd.dark, .dark-keys kbd, .key, .key.dark, .dark-keys .key { - background: rgb(80, 80, 80); - background: -moz-linear-gradient(top, rgb(60, 60, 60), rgb(80, 80, 80)); - background: -webkit-gradient(linear, left top, left bottom, from(rgb(60, 60, 60)), to(rgb(80, 80, 80))); + background: linear-gradient(top, rgb(60, 60, 60), rgb(80, 80, 80)); color: rgb(250, 250, 250); text-shadow: -1px -1px 0 rgb(70, 70, 70); - -moz-box-shadow: inset 0 0 1px rgb(150, 150, 150), inset 0 -.05em .4em rgb(80, 80, 80), 0 .1em 0 rgb(30, 30, 30), 0 .1em .1em rgba(0, 0, 0, .3); - -webkit-box-shadow: inset 0 0 1px rgb(150, 150, 150), inset 0 -.05em .4em rgb(80, 80, 80), 0 .1em 0 rgb(30, 30, 30), 0 .1em .1em rgba(0, 0, 0, .3); box-shadow: inset 0 0 1px rgb(150, 150, 150), inset 0 -.05em .4em rgb(80, 80, 80), 0 .1em 0 rgb(30, 30, 30), 0 .1em .1em rgba(0, 0, 0, .3); } /* Light style for display on dark background. */ kbd.light, .light-keys kbd, .key.light, .light-keys .key { - background: rgb(250, 250, 250); - background: -moz-linear-gradient(top, rgb(210, 210, 210), rgb(255, 255, 255)); - background: -webkit-gradient(linear, left top, left bottom, from(rgb(210, 210, 210)), to(rgb(255, 255, 255))); - color: rgb(50, 50, 50); + background: linear-gradient(top, rgb(210, 210, 210), rgb(255, 255, 255)); + color: rgb(50, 50, 50); text-shadow: 0 0 2px rgb(255, 255, 255); - -moz-box-shadow: inset 0 0 1px rgb(255, 255, 255), inset 0 0 .4em rgb(200, 200, 200), 0 .1em 0 rgb(130, 130, 130), 0 .11em 0 rgba(0, 0, 0, .4), 0 .1em .11em rgba(0, 0, 0, .9); - -webkit-box-shadow: inset 0 0 1px rgb(255, 255, 255), inset 0 0 .4em rgb(200, 200, 200), 0 .1em 0 rgb(130, 130, 130), 0 .11em 0 rgba(0, 0, 0, .4), 0 .1em .11em rgba(0, 0, 0, .9); box-shadow: inset 0 0 1px rgb(255, 255, 255), inset 0 0 .4em rgb(200, 200, 200), 0 .1em 0 rgb(130, 130, 130), 0 .11em 0 rgba(0, 0, 0, .4), 0 .1em .11em rgba(0, 0, 0, .9); -} \ No newline at end of file +} From 687b740e77f99a11f4d168e3f8babc88a17aa106 Mon Sep 17 00:00:00 2001 From: Paul Michael Jarosch Date: Wed, 16 Nov 2016 08:59:51 -0600 Subject: [PATCH 2/2] Fix gradients. --- keys.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keys.css b/keys.css index a097f13..bf79838 100644 --- a/keys.css +++ b/keys.css @@ -5,7 +5,7 @@ * * Author: Michael Hüneburg * Website: http://michaelhue.com/keyscss - * GitHub: https://github.com/michaelhue/keyscss + * GitHub: https://github.com/michaelhue/keyscss * License: MIT License (see LICENSE.txt) */ @@ -30,7 +30,7 @@ kbd[title], .key[title] { /* Dark style for display on light background. This is the default style. */ kbd, kbd.dark, .dark-keys kbd, .key, .key.dark, .dark-keys .key { - background: linear-gradient(top, rgb(60, 60, 60), rgb(80, 80, 80)); + background: linear-gradient(to bottom, rgb(60, 60, 60), rgb(80, 80, 80)); color: rgb(250, 250, 250); text-shadow: -1px -1px 0 rgb(70, 70, 70); box-shadow: inset 0 0 1px rgb(150, 150, 150), inset 0 -.05em .4em rgb(80, 80, 80), 0 .1em 0 rgb(30, 30, 30), 0 .1em .1em rgba(0, 0, 0, .3); @@ -38,7 +38,7 @@ kbd, kbd.dark, .dark-keys kbd, .key, .key.dark, .dark-keys .key { /* Light style for display on dark background. */ kbd.light, .light-keys kbd, .key.light, .light-keys .key { - background: linear-gradient(top, rgb(210, 210, 210), rgb(255, 255, 255)); + background: linear-gradient(to bottom, rgb(210, 210, 210), rgb(255, 255, 255)); color: rgb(50, 50, 50); text-shadow: 0 0 2px rgb(255, 255, 255); box-shadow: inset 0 0 1px rgb(255, 255, 255), inset 0 0 .4em rgb(200, 200, 200), 0 .1em 0 rgb(130, 130, 130), 0 .11em 0 rgba(0, 0, 0, .4), 0 .1em .11em rgba(0, 0, 0, .9);