Giter Site home page Giter Site logo

Line wrapping in examples about tr-design HOT 5 OPEN

mattgarrish avatar mattgarrish commented on July 22, 2024
Line wrapping in examples

from tr-design.

Comments (5)

sidvishnoi avatar sidvishnoi commented on July 22, 2024

I agree this should be part of default styling so all specs benefit from it. So this needs to be discussed in tr-design. I think we also need to reduce some margins and paddings on small screens and high zoom values so more text can be shown in a single line.

For reference: Reflow in WCAG 2.1

from tr-design.

marcoscaceres avatar marcoscaceres commented on July 22, 2024

Transferred to tr-design repo...

from tr-design.

fantasai avatar fantasai commented on July 22, 2024

The problem with making this the default is that sometimes line breaks are semantically important to the example. So the stylesheets apply overflow: auto to allow overflowing text to be seen, but they don't actually allow wrapping because that could distort the example.

Individual specs can add rules to enable wrapping, or we could add a pre.wrap { overflow-wrap: break-word } rule to base.css to make it easier to enable wrapping; but I wouldn't want to enable it by default on all pre elements because that can break some specs.

from tr-design.

plehegar avatar plehegar commented on July 22, 2024

+1 to @fantasai. In addition, this would be a breaking change if we were modifying the default.

If we had a pre.wrap CSS class, would this be of enough interest? Neither Respec nor Bikeshed contain such a style rule so far, which tells me this isn't used significantly.

from tr-design.

mattgarrish avatar mattgarrish commented on July 22, 2024

If we had a pre.wrap CSS class, would this be of enough interest?

As an individual rule it's a bit pointless. I don't want to add it to the hundreds of examples across the specs I work on, and have to keep remembering to add it on every time we add a new one.

Could you do something like a global body.example-wrap class, so that all pre tags in the body get wrapped?

That would be better than having to inline a rule manually, and would also presumably allow it to be documented so that others can be made aware of this issue.

from tr-design.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.