Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Postcss-hocus PostCSS Logo

Postcss-hocus fixes a tiny but annoying part of CSS: That you have to repeat yourself whenever you want to specify both :hover and :focus. Instead, you write a:hocus:

/* before */
a:hocus {
	color: red;
}

/* after */
a:hover,a:focus {
	color: red;
}

Additionally, you can write a:pocus to include the :active style:

/* before */
a:pocus {
	color: red;
}

/* after */
a:hover,a:active,a:focus {
	color: red;
}

Usage

Add postcss-hocus using npm:

npm install postcss-hocus --save-dev

Then add in your PostCSS Config:

postcss([
	require('postcss-hocus')
]);

About

Postcss-hocus fixes a tiny but annoying part of CSS: That you have to repeat yourself whenever you want to specify both `:hover` and `:focus`.

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.