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

[css-box-4] Adding physical versions of (margin|padding|border)-(inline|block) #11436

Open
yassh opened this issue Jan 4, 2025 · 2 comments
Open

Comments

@yassh
Copy link

yassh commented Jan 4, 2025

  • margin-block
  • margin-inline
  • padding-block
  • padding-inline
  • border-block
  • border-inline

These logical properties are useful features. However, when used in combination with CSS written in traditional physical properties, it results in a mix of logical and physical properties, compromising code consistency.

If there were properties named in physical versions (such as margin-vertical, margin-horizontal, padding-vertical, padding-horizontal, border-vertical, border-horizontal), they could be more conveniently used in physically-based CSS.

@Loirooriol
Copy link
Contributor

See #6507, there doesn't seem to be a need for these given the existence of the logical shorthands.

mix of logical and physical properties, compromising code consistency

Doesn't seem a strong reason to me, you could also switch your code to only use logical properties instead.

@yassh
Copy link
Author

yassh commented Jan 5, 2025

@Loirooriol
Thank you for your feedback.

In large-scale projects or legacy codebases where a complete transition to logical properties is difficult, I believe that physical shorthand properties like margin-vertical and margin-horizontal would help maintain consistency in a codebase centered around physical properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants