csstools / stylelint-use-logical

Enforce usage of logical properties and values in CSS
Creative Commons Zero v1.0 Universal
50 stars 9 forks source link

Unknown shorthand for block and inline combination #1

Closed joelovasco closed 4 months ago

joelovasco commented 5 years ago

Thanks for all your work on this plugin. Finding two shorthands that do not seem to be supported.

https://github.com/csstools/stylelint-use-logical/blob/016c7d43aa54fcdc10ba63ec5c3bb142b8089202/lib/maps.js#L12

[['margin-top', `margin-${inline.start[dir]}`], 'margin-start'],
[['margin-bottom', `margin-${inline.end[dir]}`], 'margin-end'],

and

[['padding-top', `padding-${inline.start[dir]}`], 'padding-start'],
[['padding-bottom', `padding-${inline.end[dir]}`], 'padding-end']

Currently, these shorthand options are not in the current draft.

jonathantneal commented 5 years ago

You are 100% correct, and I had never realized this, nor had anyone else brought this to my attention. In fact, I struggled to accept that I had even made such a mistake until I verified it in the current draft, the last draft, and the editor draft.

Worse yet, the PostCSS Logical Plugin is littered with transforms for properties ending with -start and -end.

The obvious solution is to remove the transforms and publish a breaking release for this plugin, and then to do the same for all of the others. This would potentially affect millions of weekly installs, so I can’t really comprehend its impact. As for this plugin, ceasing flags for potential -start and -end usage would be breaking but non-destructive.

Thank you. I’ll leave this open while I work on the fix, which may take some time.

joelovasco commented 5 years ago

@jonathantneal thanks for looking into this!

joelovasco commented 5 years ago

@jonathantneal found a couple of others for inset

[['top', inline.start[dir]], 'inset-start'],
[['bottom', inline.end[dir]], 'inset-end'],
jonathantneal commented 5 years ago

I will make these changes as part of the 2.0.0 work.

fregante commented 4 years ago

Were these fixed by 2.0.0?

Jordan-Hall commented 3 years ago

@jonathantneal I've added the full standard here https://github.com/Jordan-Hall/stylelint-use-logical. Do you want to take the PR so i can close my temporary npm package

Jordan-Hall commented 3 years ago

@jonathantneal & @hacknug Is this still being maintained, I have another version now releasing along side and I've added a migration to move from unsupported logical to spec based

romainmenke commented 4 months ago

This was fixed as far as I can tell