Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/niksy/stylelint-selector-pseudo-class-lvhfa
Stylelint rule for LVHFA order in link selectors.
https://github.com/niksy/stylelint-selector-pseudo-class-lvhfa
Last synced: about 2 months ago
JSON representation
Stylelint rule for LVHFA order in link selectors.
- Host: GitHub
- URL: https://github.com/niksy/stylelint-selector-pseudo-class-lvhfa
- Owner: niksy
- License: mit
- Created: 2016-06-26T06:50:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-02-26T09:00:19.000Z (10 months ago)
- Last Synced: 2024-10-18T04:04:48.827Z (2 months ago)
- Language: JavaScript
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# stylelint-selector-pseudo-class-lvhfa
[![Build Status][ci-img]][ci]
Stylelint rule for LVHFA order in link selectors.
## Install
```sh
npm install stylelint-selector-pseudo-class-lvhfa --save-dev
```## Usage
Add this config to your `.stylelintrc`:
```json
{
"plugins": [
"stylelint-selector-pseudo-class-lvhfa"
],
"rules": [
"plugin/selector-pseudo-class-lvhfa": true
]
}
```## Details
```css
a:link,
a:visited,
a:hover,
a:focus,
a:active {}
/** ↑
* This type of pseudo-class selector */
```When specifying link pseudo-classes, always do so in this order: **L**ink,
**V**isited, **H**over, **F**ocus, **A**ctive. Any other order won’t work
consistently. This rule is probably not valid anymore, but it helps to keep
these selectors in consistent order.For more information, read
[Eric Meyer’s explanation](http://meyerweb.com/eric/thoughts/2007/06/11/who-ordered-the-link-states/).To help you remember this order, there are a couple of mnemonics for that:
- LoVe, HAte
- Lord Vader Hates Furry Animals
- Lord Vader's Handle Formerly Anakin
- Lord Voldemort Has Foul Ambitions### Options
#### `true`
The following patterns are considered warnings:
```css
a:visited,
a:link,
a:focus,
a:hover,
a:active {}
``````css
a:visited,
a:link,
a:active {}
```The following patterns are _not_ considered warnings:
```css
a:link,
a:visited,
a:hover,
a:focus,
a:active {}
``````css
a:link,
a:visited,
a:active {}
```---
## License
MIT © [Ivan Nikolić](http://ivannikolic.com)
[ci]: https://github.com/niksy/stylelint-selector-pseudo-class-lvhfa/actions?query=workflow%3ACI
[ci-img]: https://github.com/niksy/stylelint-selector-pseudo-class-lvhfa/workflows/CI/badge.svg?branch=master