Skip to content

Define allow_wrap, preserve_newlines, preserve_spaces methods on style::computed_values::white_space::T #8128

Closed

Description

@Ms2ger

Currently, we have white_space_allow_wrap, white_space_preserve_newlines, and white_space_preserve_spaces methods on Fragment (components/layout/fragment.rs). It would be nicer to have those methods on white_space::T instead, replacing the existing calls with white_space().allow_wrap(), etc, and using the method in components/layout/wrapper.rs as well.

Calling @SimonSapin since I don't know in what file these implementations should live.

Activity

  1. added
    I-refactor
    on Oct 21, 2015
  2. SimonSapin commented on Oct 21, 2015

    @SimonSapin
    Member

    This sounds like layout behavior on a type that’s defined on the style crate. If you really want a method on that type, it’d have to be in an extension trait. Whitespace is text and text is inline, so inline.rs sounds relevant.

  3. added 2 commits that reference this issue on Nov 23, 2015
    fba3bc2
    6449cd0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-refactor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions