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

Turn white-space into a shorthand #32146

Merged
merged 1 commit into from
Apr 29, 2024

Commits on Apr 29, 2024

  1. Turn white-space into a shorthand

    Bumps Stylo to servo/stylo#37
    
    `white-space` is split into `white-space-collapse` and `text-wrap-mode`:
    
    | white-space | white-space-collapse | text-wrap-mode |
    | ----------- | -------------------- | -------------- |
    | normal      | collapse             | wrap           |
    | nowrap      | collapse             | nowrap         |
    | pre-wrap    | preserve             | wrap           |
    | pre         | preserve             | nowrap         |
    | pre-line    | preserve-breaks      | wrap           |
    | -           | preserve-breaks      | nowrap         |
    
    Note this introduces a combination that wasn't previously possible,
    but I think the existing logic can handle it well enough.
    
    The old `allow_wrap()` is replaced by checking whether `text-wrap-mode`
    is set to `wrap`.
    
    The old `preserve_newlines()` is replaced by checking whether
    `white-space-collapse` is *not* set to `collapse`.
    
    The old `preserve_spaces()` is replaced by checking whether
    `white-space-collapse` is set to `preserve`.
    Loirooriol committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    f2b6cb5 View commit details
    Browse the repository at this point in the history