Sha256: 951ce7111b04ff9833274715af52b25bddea43ee3e18dcbf70a508de9f94f84c

Contents?: true

Size: 1.36 KB

Versions: 24

Compression:

Stored size: 1.36 KB

Contents

# properties-alphabetical-order

Specify the alphabetical order of properties within declaration blocks.

```css
a {
	color: pink;
	top: 0;
}
/** ↑
 * These properties */
```

Shorthand properties *must always* precede their longhand counterparts, even if that means they are not alphabetized.
(See also [`declaration-block-no-shorthand-property-overrides`](https://stylelint.io/user-guide/rules/declaration-block-no-shorthand-property-overrides/).)

Prefixed properties *must always* precede the unprefixed version.

This rule ignores variables (`$sass`, `@less`, `--custom-property`).

## Options

### `true`

The following patterns are considered warnings:

```css
a {
	top: 0;
	color: pink;
}
```

```css
a {
	border-bottom-color: pink;
	border-color: transparent;
}
```

```css
a {
	-moz-transform: scale(1);
	transform: scale(1);
	-webkit-transform: scale(1);
}
```

The following patterns are *not* considered warnings:

```css
a {
	color: pink;
	top: 0;
}
```

```css
a {
	border-color: transparent;
	border-bottom-color: pink;
}
```

```css
a {
	-webkit-transform: scale(1);
	-moz-transform: scale(1);
	transform: scale(1);
}
```

```css
a {
	-moz-transform: scale(1);
	-webkit-transform: scale(1);
	transform: scale(1);
}
```

## Optional secondary options

### `disableFix: true`

Disable autofixing. Autofixing is enabled by default if it's enabled in stylelint configuration.

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
trusty-cms-6.3.1 node_modules/stylelint-order/rules/properties-alphabetical-order/README.md
trusty-cms-5.0.7 node_modules/stylelint-order/rules/properties-alphabetical-order/README.md
trusty-cms-5.0.6 node_modules/stylelint-order/rules/properties-alphabetical-order/README.md
trusty-cms-5.0.5 node_modules/stylelint-order/rules/properties-alphabetical-order/README.md
trusty-cms-5.0.4 node_modules/stylelint-order/rules/properties-alphabetical-order/README.md
trusty-cms-5.0.3 node_modules/stylelint-order/rules/properties-alphabetical-order/README.md
trusty-cms-5.0.2 node_modules/stylelint-order/rules/properties-alphabetical-order/README.md
trusty-cms-5.0.1 node_modules/stylelint-order/rules/properties-alphabetical-order/README.md
trusty-cms-4.3.5 node_modules/stylelint-order/rules/properties-alphabetical-order/README.md
trusty-cms-5.0.0 node_modules/stylelint-order/rules/properties-alphabetical-order/README.md
trusty-cms-4.3.4 node_modules/stylelint-order/rules/properties-alphabetical-order/README.md
trusty-cms-4.3.3 node_modules/stylelint-order/rules/properties-alphabetical-order/README.md
trusty-cms-4.3.2 node_modules/stylelint-order/rules/properties-alphabetical-order/README.md
trusty-cms-4.3.1 node_modules/stylelint-order/rules/properties-alphabetical-order/README.md
trusty-cms-4.3 node_modules/stylelint-order/rules/properties-alphabetical-order/README.md
trusty-cms-4.2.3 node_modules/stylelint-order/rules/properties-alphabetical-order/README.md
trusty-cms-4.2.2 node_modules/stylelint-order/rules/properties-alphabetical-order/README.md
trusty-cms-4.2.1 node_modules/stylelint-order/rules/properties-alphabetical-order/README.md
trusty-cms-4.2 node_modules/stylelint-order/rules/properties-alphabetical-order/README.md
trusty-cms-4.1.9 node_modules/stylelint-order/rules/properties-alphabetical-order/README.md