Skip to content
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

Update width syntax definition patch #242

Closed
wants to merge 1 commit into from

Conversation

Mouvedia
Copy link

@Mouvedia Mouvedia commented Feb 4, 2023

Adds

check stylelint/stylelint#6511 for context
related: postcss/autoprefixer#1294

@@ -310,7 +310,7 @@
"https://developer.mozilla.org/en-US/docs/Web/CSS/width",
"https://github.com/csstree/stylelint-validator/issues/29"
],
"syntax": "| fill | stretch | intrinsic | -moz-max-content | -webkit-max-content | -moz-fit-content | -webkit-fit-content"
"syntax": "| fill | stretch | intrinsic | min-intrinsic | -moz-min-content | -moz-max-content | -webkit-max-content | -moz-fit-content | -webkit-fit-content | -moz-available | -webkit-fill-available"
},
"min-width": {
"comment": "extend by non-standard width keywords https://developer.mozilla.org/en-US/docs/Web/CSS/width",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lahmatiy
If I understand correctly min-width and max-width are automatically populated?
i.e. no need for duplication

@Mouvedia
Copy link
Author

@lahmatiy is there anything I can do to help this PR being merged?

@lahmatiy
Copy link
Member

It seems there is some mess in the dictionaries regarding size properties. Judging by the specifications and browser tests, all min-/max-/width and min-/max-/height properties, as well as their logical block/inline versions, support the same set of values. I replaced <-non-standard-width> with <-non-standard-size>, to which I added all vendor values, plus intrinsic/min-intrinsic (non-prefix aliases). Now, all properties are supplemented with <-non-standard-size> and stretch (which is in the spec and should appear in browsers):

<all-size-properties> =
    auto | <length> | <percentage> |
    min-content | max-content | fit-content | fit-content( <length-percentage> ) |
    stretch | <-non-standard-size>

<-non-standard-size> =
    intrinsic | min-intrinsic |
    -webkit-fill-available | -webkit-fit-content | -webkit-min-content | -webkit-max-content |
    -moz-available | -moz-fit-content | -moz-min-content | -moz-max-content

Fixed in commit: 36a2a6d

@Mouvedia Thank you for your effort and helpful links! Closing PR without merge, since I fixed the issue by myself.

@lahmatiy lahmatiy closed this Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants