|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
851 bytes
|
| Line | |
|---|
| 1 | import type { PluginCreator } from 'postcss';
|
|---|
| 2 |
|
|---|
| 3 | declare const cssDeclarationSorter: PluginCreator<{
|
|---|
| 4 | /**
|
|---|
| 5 | Provide the name of one of the built-in sort orders or a comparison function that is passed to `Array.sort`.
|
|---|
| 6 |
|
|---|
| 7 | @default 'alphabetical'
|
|---|
| 8 | */
|
|---|
| 9 | order?: SortOrder | SortFunction | undefined;
|
|---|
| 10 |
|
|---|
| 11 | /**
|
|---|
| 12 | To prevent breaking legacy CSS where shorthand declarations override longhand declarations. For example `animation-name: some; animation: greeting;` will be kept in this order.
|
|---|
| 13 |
|
|---|
| 14 | @default false
|
|---|
| 15 | */
|
|---|
| 16 | keepOverrides?: boolean;
|
|---|
| 17 | }>;
|
|---|
| 18 |
|
|---|
| 19 | export = cssDeclarationSorter;
|
|---|
| 20 |
|
|---|
| 21 | type SortOrder = 'alphabetical' | 'concentric-css' | 'smacss';
|
|---|
| 22 |
|
|---|
| 23 | /**
|
|---|
| 24 | * This function receives two declaration property names and is expected
|
|---|
| 25 | * to return -1, 0 or 1 depending on the wanted order.
|
|---|
| 26 | */
|
|---|
| 27 | type SortFunction = (propertyNameA: string, propertyNameB: string) => -1 | 0 | 1;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.