-
-
Notifications
You must be signed in to change notification settings - Fork 930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix declaration-block-no-redundant-longhand-properties
false negatives for *-block
and *-inline
logical properties
#7200
Comments
@smfaramarzirad Thanks for the report. The current I'm transferring this issue to the Stylelint core repository since this repository is for the shared config. |
margin-block
and margin-inline
support for declaration-block-no-redundant-longhand-properties
margin-block
and margin-inline
support for declaration-block-no-redundant-longhand-properties
declaration-block-no-redundant-longhand-properties
false negatives for margin-block
and margin-inline
properties
CanIuse stats:
I think they have enough usage to be supported. FYI. I've labeled the issue as ready to implement. Please consider contributing if you have time. There are steps on how to fix a bug in a rule in the Developer guide. @mattxwang Feel free to comment if you have any help. |
Those are not covered as well:
see #6984 (comment) |
@Mouvedia Thanks for the info. All of the properties except For It's no problem to include also the additional properties in one PR. 👍🏼 |
In my country (Iran), more than 95% of browsers support margin-block. The issue is not only margin-inline and margin-block. There are other logical features such as: border-block, border-inline, |
Thanks for tagging me in! Course prep has been unfortunately busier than I thought, but if nobody else is interested in this PR, I can certainly add it to my own backlog. I can be conservative for now in the properties we support. I've also been meaning to resolve some of the longstanding issues with the autofix - I suspect there are still a few incorrect behaviours (e.g. with |
declaration-block-no-redundant-longhand-properties
false negatives for margin-block
and margin-inline
propertiesdeclaration-block-no-redundant-longhand-properties
false negatives for *-block
and *-inline
logical properties
…ves for `margin-block` and `margin-inline` This is the original ask in #7200.
…ves for `*-block` and `*-inline` logical properties (#7208) Closes #7200. > Is there anything in the PR that needs further explanation? Bundling many properties into this PR as suggested in the original issue. I'm only including the ones that are trailed with `-block` and `-inline` (as scoped in the original issue title); I will address further false negatives in another PR. I've chosen to base this off of `main` since: - we can probably publish a patch off of this - I don't think this'll introduce many (or any?) merge conflicts with `v16` Affected properties: - [x] `border-block` - [x] `border-inline` - [x] `inset-block` - [x] `inset-inline` - [x] `scroll-margin-block` - [x] `scroll-margin-inline` - [x] `scroll-padding-block` - [x] `scroll-padding-inline` - [x] `margin-block` - [x] `margin-inline` - [x] `padding-block` - [x] `padding-inline`
@Mouvedia I'm going through the list you had earlier, and wanted to ask:
(MDN also has a handly list that I'm using, though it is incomplete) |
I don't know what you mean by true though.
I am not sure, I can't remember; I may have made a mistake. Ill remove it from the list. |
Two things on my mind:
From my understanding of the spec, it's also not straightforward to convert two of the longhands into the |
Not always indeed; it doesn't have to. We are not in a hurry to support all shorthands. |
…ves for `overflow`, `overscroll-behavior`, `scroll-margin`, `scroll-padding`, and new Box Alignment shorthands (#7213) Ref: #7200 (comment) & other missing shorthands. Wasn't sure about `background-position` or `border-image-width` in the linked issue, so I left a comment. Current properties: - [x] `gap`: [94% on caniuse](https://caniuse.com/mdn-css_properties_gap) - [x] `overflow` - [x] `overscroll-behavior` - [x] `place-content`: [95% on caniuse](https://caniuse.com/mdn-css_properties_place-content) - [x] `place-items`: [95% on caniuse](https://caniuse.com/mdn-css_properties_place-items) - [x] `place-self`: [95% on caniuse](https://caniuse.com/mdn-css_properties_place-self) - [x] `scroll-margin` (we already supported the `block`/`inline` properties) - [x] `scroll-padding` (we already supported the `block`/`inline` properties) Properties in the [shorthand list](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties#see_also) that I'm choosing not to do (but could bundle in?): - `container`: [88% on caniuse](https://caniuse.com/mdn-css_properties_container). I think this is supported by all major browsers, but is slightly smaller than the other shorthands we've supported - `contain-intrinsic-size`: [74% on caniuse](https://caniuse.com/mdn-css_properties_contain-intrinsic-size), which seems low? - `font-synthesis`: [92% on caniuse](https://caniuse.com/mdn-css_properties_font-synthesis), but the way this shorthand behaves is a bit different than the standard shorthand (it's almost like a flag?) so I'll do this in a different PR - `font-variant`: [96% on caniuse](https://caniuse.com/mdn-css_properties_font-variant) same as `font-synthesis` re: shorthand behavior - `scroll-timeline`: [62% on caniuse](https://caniuse.com/mdn-css_properties_scroll-timeline), definitely too low!
What steps are needed to reproduce the bug?
margin-block-start: 2px;
margin-block-end: 2px;
margin-inline-start: 2px;
margin-inline-end: 2px;
What did you expect to happen?
margin-block: 2px;
margin-inline: 2px;
What actually happened?
margin-block-start: 2px;
margin-block-end: 2px;
margin-inline-start: 2px;
margin-inline-end: 2px;
The text was updated successfully, but these errors were encountered: