From f51e4afbb7f2e0f1ff2df66e08ed48951e7aaf3b Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Mon, 9 Jan 2017 18:15:39 -0500 Subject: [PATCH] Show outlines when navigating with a keyboard but not with touch or a mouse --- bower.json | 3 ++- gulpfile.js | 1 + resources/assets/sass/app.scss | 12 ++++++++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index f3ead65..3613e7c 100644 --- a/bower.json +++ b/bower.json @@ -16,6 +16,7 @@ "SpinKit": "~1.2.5", "jQuery.stickyFooter": "https://github.com/miWebb/jQuery.stickyFooter.git#~1.2.3", "bootstrap-sass": "^3.3.7", - "list.js": "^1.3.0" + "list.js": "^1.3.0", + "what-input": "^4.0.4" } } diff --git a/gulpfile.js b/gulpfile.js index 8304351..02279ef 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -33,6 +33,7 @@ const jsPublic = [ const jsPublicLibs = [ "bower_components/jquery/dist/jquery.js", "bower_components/bootstrap-sass/assets/javascripts/bootstrap.js", + "bower_components/what-input/dist/what-input.js", "bower_components/jQuery.stickyFooter/assets/js/jquery.stickyfooter.js" ]; diff --git a/resources/assets/sass/app.scss b/resources/assets/sass/app.scss index 7e9f02c..61db836 100644 --- a/resources/assets/sass/app.scss +++ b/resources/assets/sass/app.scss @@ -13,8 +13,16 @@ // Main Website Styles // -* { - outline: none !important; +[data-whatinput="initial"], [data-whatinput="keyboard"] { + :focus { + outline: 1px dotted $c-base; + } +} + +[data-whatinput="mouse"], [data-whatinput="touch"] { + :focus { + outline: none !important; + } } html {