Skip to content
Extraits de code Groupes Projets
Valider c96eb883 rédigé par Matthieu Aubry's avatar Matthieu Aubry
Parcourir les fichiers

Merge pull request #9604 from piwik/9578_2

Only show the ouline when the keyboard is used (do not show the outline when mouse is used)
parents b16d9a69 7e9c8dc4
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -192,4 +192,13 @@ $( document ).ready(function() { ...@@ -192,4 +192,13 @@ $( document ).ready(function() {
$('a[name="main"]').attr('tabindex', -1).focus(); $('a[name="main"]').attr('tabindex', -1).focus();
$(window).scrollTo($('a[name="main"]')); $(window).scrollTo($('a[name="main"]'));
}); });
// Only use the "outline" CSS property on focus, when the keyboard is being used (do not show the outline when clicking with the mouse)
$("body").on("mousedown", "*", function(e) {
if (($(this).is(":focus") || $(this).is(e.target)) && $(this).css("outline-style") == "none") {
$(this).css("outline", "none").on("blur", function() {
$(this).off("blur").css("outline", "");
});
}
});
}); });
\ No newline at end of file
body { body {
:focus { :focus {
outline: 0; outline:@theme-color-background-highContrast solid 2px;
-moz-box-shadow: inset 0 0 0 2px @theme-color-background-highContrast; }
-webkit-box-shadow: inset 0 0 0 2px @theme-color-background-highContrast;
box-shadow: inset 0 0 0 2px @theme-color-background-highContrast;
border-radius: 2px;
-moz-border-radius:2px;
-webkit-border-radius:2px;
}
} }
#header { #header {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter