Skip to content

Files

Latest commit

 

History

History
133 lines (93 loc) · 1.53 KB

selector-attribute-operator-space-before.md

File metadata and controls

133 lines (93 loc) · 1.53 KB

Pattern: Malformed whitespace before operator in attribute selector

Issue: -

Description

Require a single space or disallow whitespace before operators within attribute selectors.

Examples

"always"

There must always be a single space before the operator.

The following patterns are considered violations:

[target=_blank] {}
[target= _blank] {}
[target='_blank'] {}
[target="_blank"] {}
[target= '_blank'] {}
[target= "_blank"] {}

The following patterns are not considered violations:

[target] {}
[target =_blank] {}
[target ='_blank'] {}
[target ="_blank"] {}
[target = _blank] {}
[target = '_blank'] {}
[target = "_blank"] {}

"never"

There must never be a single space before the operator.

The following patterns are considered violations:

[target =_blank] {}
[target = _blank] {}
[target ='_blank'] {}
[target ="_blank"] {}
[target = '_blank'] {}
[target = "_blank"] {}

The following patterns are not considered violations:

[target] {}
[target=_blank] {}
[target='_blank'] {}
[target="_blank"] {}
[target= _blank] {}
[target= '_blank'] {}
[target= "_blank"] {}

Further Reading