Git Product home page Git Product logo

stylelint-selector-pseudo-class-lvhfa's Introduction

stylelint-selector-pseudo-class-lvhfa

Build Status

Stylelint rule for LVHFA order in link selectors.

Install

npm install stylelint-selector-pseudo-class-lvhfa --save-dev

Usage

Add this config to your .stylelintrc:

{
	"plugins": [
		"stylelint-selector-pseudo-class-lvhfa"
	],
	"rules": [
		"plugin/selector-pseudo-class-lvhfa": true
	]
}

Details

    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: Link, Visited, Hover, Focus, Active. 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.

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:

a:visited,
a:link,
a:focus,
a:hover,
a:active {}
a:visited,
a:link,
a:active {}

The following patterns are not considered warnings:

a:link,
a:visited,
a:hover,
a:focus,
a:active {}
a:link,
a:visited,
a:active {}

License

MIT © Ivan Nikolić

stylelint-selector-pseudo-class-lvhfa's People

Contributors

niksy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.