elad2412 / the-new-css-reset

The New Simple and Lighter CSS Reset
https://elad2412.github.io/the-new-css-reset/
MIT License
2.26k stars 229 forks source link

Change `max-width` to `max-inline-size` #50

Closed vicsantizo closed 2 years ago

vicsantizo commented 2 years ago

Change max-width to max-inline-size in order to control layout through logical rather than physical, direction and dimension mappings. This helps with making websites internationally compatible. https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties

graymatter00 commented 2 years ago

According to https://developer.mozilla.org/en-US/docs/Web/CSS/max-inline-size and https://caniuse.com/?search=max-inline-size, max-inline-size is only supported on iOS with Safari version 12.2 and above. Previous Safari versions require the -webkit- prefix.

According to https://stackoverflow.com/questions/8627968/what-version-of-mobile-safari-comes-with-each-version-of-ios, Safari version 12.1 is the highest version supported on iPhone 6. I have confirmed this with an iPhone 6 device that I have for testing. On this device the latest available iOS version is 12.5.5 with the latest available Safari version being 12.1. See attached screenshots.

My understanding is that iPhone 6 will not receive further Safari updates, even though there are a surprising number of iPhone 6 units still in use.

Therefore, if this Pull Request is implemented, please consider adding the -webkit- prefixed property as well.

img {
    -webkit-max-inline-size: 100%;
    max-inline-size: 100%;
}

20220808_123709 20220808_123509

graymatter00 commented 2 years ago

Please excuse my ignorance, but I don't know what "closed this by deleting the head repository" means. Could someone please explain?

vicsantizo commented 2 years ago

The pr was closed since I deleted the forked repo

graymatter00 commented 2 years ago

I see. Thanks for the explanation.

Although, that's a shame. I agreed with your suggested change. It would be nice to know why it wasn't merged. Perhaps you could re-submit it as a suggestion in Issues.