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

Replace dir-dependent margin/margin-left/margin-right with logical properties #14670

Merged
merged 1 commit into from
Mar 19, 2022

Commits on Mar 19, 2022

  1. Replace dir-dependent margin/margin-left/margin-right with lo…

    …gical properties
    
    *Please note:* This is another step in what will, time permitting, become a series of patches to simplify/modernize the viewer CSS.
    
    Rather than having to manually specify ltr/rtl-specific margin-values in the CSS, we can use logical margin instead (and similar for some related left/right occurrences).
    These logical properties depend on, among other things, the direction of the HTML document which we *always* specify in the viewer.
    
    Given that most of these logical CSS properties are fairly new, and that cross-browser support is thus somewhat limited (see below), we need to use a couple of PostCSS plugins (see below) in order to support this in the GENERIC viewer.
    
     - https://developer.mozilla.org/en-US/docs/Web/CSS/margin-inline#browser_compatibility
     - https://developer.mozilla.org/en-US/docs/Web/CSS/margin-inline-start#browser_compatibility
     - https://developer.mozilla.org/en-US/docs/Web/CSS/margin-inline-end#browser_compatibility
     - https://developer.mozilla.org/en-US/docs/Web/CSS/inset-inline-start#browser_compatibility
     - https://developer.mozilla.org/en-US/docs/Web/CSS/inset-inline-end#browser_compatibility
    
    ---
    
     - https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical
     - https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-dir-pseudo-class
    Snuffleupagus committed Mar 19, 2022
    Configuration menu
    Copy the full SHA
    c99d558 View commit details
    Browse the repository at this point in the history