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
[css-grid] Handle [align/justify]-[content/items] appropriately #1118
Comments
If the author uses |
Maybe we should show the warning on both cases? It is not so hard for user to move |
We could but Autoprefixer is all about automating as much as possible so users don't have to think about IE as much. I don't see any downsides to prefixing the Can you think of any significant downsides? |
.child {
align-self: start;
}
.parent {
display: grid;
align-items: center;
} |
🤔...😵 right. Ok maybe just warnings for both then. |
If we give a warning for |
I sent this task to our Cult of Martians |
Is it possible to run some testing method each time while checking property? |
@andrIvash I'm not sure I understood you correctly, but If you want to run some function for a test stylesheet and compare the output, you need to check out Also check out |
The easiest way to do quick tests using the current code base is by running the Check the output in |
Maybe it should look smth like this: |
IE does not supporting any of these properties:
For
align-items
andjustify-items
, you can often work around the issue by usingalign-self
andjustify-self
instead:It doesn't work in 100% of circumstances but it does work most of the time. If Autoprefixer knows that the element is a grid container then it should be prefixed like so:
Input CSS
Expected output CSS
If
justify-items
oralign-items
is used in the same rule as any of the following properties, then it is safe to assume that it is a grid container element:For
align-content
andjustify-content
Autoprefixer should warn users that IE does not support those properties if it detects that they are being used on a grid container and grid translations are enabled.Example Warning:
The text was updated successfully, but these errors were encountered: