ream88 / stylelint-config-idiomatic-order

stylelint + idiomatic-css = ❤️
https://www.npmjs.com/package/stylelint-config-idiomatic-order
MIT License
180 stars 19 forks source link

CSS Logical Properties and Values #80

Open stiekstra opened 1 year ago

stiekstra commented 1 year ago

Is there a way to support the ordering of the CSS Logical Properties? At the moment is seems that properties like padding-inline are placed at the bottom instead of ordered with the other box-model properties?

katiehartrick commented 1 year ago

Second this, it is a much-needed addition.

There is an open PR from branch https://github.com/julienw/stylelint-config-idiomatic-order/tree/add-inline-stuff

m4olivei commented 1 year ago

This would be wonderful, as it is the linter forces a pretty frustrating non-intuitve ordering.

For example, what I want:

.my-rule {
  display: flex;
  inline-size: 12px;
  block-size: 24px;
  align-items: center;
  justify-content: space-between;
  background-color: $background;
  /* stylelint-disable-next-line declaration-property-value-disallowed-list */
  border-radius: unset;
  box-shadow: none;
  transform: translate(-100%, -50%);
  transition: none;
}

What it forces me into:

.my-rule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: $background;
  block-size: 24px;
  /* stylelint-disable-next-line declaration-property-value-disallowed-list */
  border-radius: unset;
  box-shadow: none;
  inline-size: 12px;
  transform: translate(-100%, -50%);
  transition: none;
}

In terms of idomatic CSS, CSS logical properties that would be part of positioning / display and box model, are pushed into the "Other" alphabetical grouping.

m4olivei commented 1 year ago

Linking the open PR: https://github.com/ream88/stylelint-config-idiomatic-order/pull/76