Skip to content

Commit

Permalink
Document configuration decisions
Browse files Browse the repository at this point in the history
  • Loading branch information
stormwarning committed Jan 16, 2025
1 parent 63878df commit 884902b
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/decisions/000-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Title

**Date:** YYYY-MM-DD

**Issue:** [#0](https://github.com/stormwarning/stylelint-config-recess-order/issues/0)

## Context

<!-- -->

## Decision

<!-- -->

## Consequences

<!-- -->
25 changes: 25 additions & 0 deletions docs/decisions/001-logical-vs-physical.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Order of logical direction properties

**Date:** 2024-09-01

**Issue:** [#299](https://github.com/stormwarning/stylelint-config-recess-order/issues/299)

## Context

Logical properties are starting to roll out to browsers and seeing more use.
There is some question about whether logical properties should come *after*
physical properties, allowing the browser to fall back to something if logical
properties are not supported.

## Decision

Logical properties are considered less "specific" and are ordered before
physical properties. This allows physical properties to override the logical
properties if needed.

## Consequences

Modern, evergreen browsers all support logical properties, so the physical
properties aren't needed as a fallback. If support for older browsers is
required when using logical properties, move the logical or physical properties
to a separate stylesheet or selector, or disable this rule for those cases.
49 changes: 49 additions & 0 deletions docs/decisions/002-logical-direction-order.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Order of logical direction properties

**Date:** 2025-01-16

**Issue:** [#384](https://github.com/stormwarning/stylelint-config-recess-order/issues/384)

## Context

Logical properties are not ordered consistently. In some cases `*-block` comes
before `*-inline` while in others it is the opposite. There should be a rubric
to help determine what the order should be when adding new properties.

While it would be easy to just make a blanket call for `*-block` to always
precede `*-inline`, but this doesn't always match the order used when referring
to some pairs of properties.

## Decision

If there are only two possible directions the order should be `*-inline` then
`*-block`.

Examples of two-direction ordered pairs:

- `*-rows` > `*-columns`
- `*-x` > `*-y`

For other properties, the order should be `*-block` then `*-inline`.

## Consequences

This is actually how things are ordered currently. The only changes to the
current properties would be as follows:

```diff
+ overflow-inline
overflow-block
- overflow-inline
overflow-x
overflow-y
```

```diff
+ scroll-padding-block-*
scroll-padding-inline-*
- scroll-padding-block-*
+ scroll-margin-block-*
scroll-margin-inline-*
- scroll-margin-block-*
```

0 comments on commit 884902b

Please # to comment.