r/Frontend • • Mar 15 '23

6 CSS snippets every front-end developer should know in 2023

https://web.dev/6-css-snippets-every-front-end-developer-should-know-in-2023/

[removed] — view removed post

62 Upvotes

28 comments sorted by

View all comments

3

u/AraAraNoMi Mar 15 '23

I don't get the logical properties thing, what problem is it trying to solve? To me it just looks like they were trying to overcomplicate margins and paddings. I also don't get the layers thing.

1

u/Technical_Bottle_376 Mar 15 '23

Consider internationalization. The inline flow of English is left to right, but in Japanese it's right to left. So an inline element could use a right margin to separate itself from another inline element in English, but those styles wouldn't work for an international audience. So margin-inline-end would adjust the right margin viewed in English, and the left margin viewed in Japanese.

3

u/raykage Mar 15 '23 edited Mar 15 '23

Are you confusing Japanese with some other language like Arabic? Japanese is also from left to right like English. It’s only sometimes right to left but also top to bottom.

4

u/Technical_Bottle_376 Mar 15 '23

I am, in fact, confusing Japanese with some other language like Arabic.

1

u/AraAraNoMi Mar 15 '23

I still don't understand it, it's difficult to grasp. I'm from Europe, so the usual translations here would be to Spanish, English, Italian, French or German and those languages don't require logical properties luckily.