postcss/postcss-focus

Name: postcss-focus

Owner: PostCSS

Description: PostCSS plugin to add :focus selector to every :hover for keyboard accessibility

Created: 2015-04-23 14:08:59.0

Updated: 2018-04-19 21:04:50.0

Pushed: 2017-10-12 20:04:08.0

Homepage:

Size: 82

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

PostCSS Focus Build Status

<img align=“right” width=“135” height=“95”

 title="Philosopher?s stone, logo of PostCSS"
 src="http://postcss.github.io/postcss/logo-leftp.svg">

PostCSS plugin to add :focus selector to every :hover for keyboard accessibility.

See also postcss-pseudo-class-enter for more explicit way.

cus {
outline: 0;

ton:hover {
background: red;

ss
cus {
outline: 0;

ton:hover, .button:focus {
background: red;

If there is a :focus selector, it will be excluded from the processing.

over, .b:hover {
outline: 0;

ocus {
background: red;

ss
over, .b:hover, .a:focus {
outline: 0;

ocus {
background: red;

Usage
css([ require('postcss-focus') ])

See PostCSS docs for examples for your environment.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.