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

How to handle overflow for text in a shape? #36

Closed
nikosandronikos opened this issue Jan 30, 2016 · 3 comments
Closed

How to handle overflow for text in a shape? #36

nikosandronikos opened this issue Jan 30, 2016 · 3 comments

Comments

@nikosandronikos
Copy link
Member

Source: http://tavmjong.free.fr/SVG/TEXT_SYDNEY_2016/#Wrapped (See 3.2)

Possible solutions:

  1. Do not define now for SVG.
  2. Provide a means to expose the text, for example, displaying it on hovering over the ellipses).
  3. Continue in rectangle region below shape as dictated by Shapes 2 (using width of 'shape-inside' to define "rectangular bounds").
@AmeliaBR
Copy link
Contributor

AmeliaBR commented Feb 2, 2016

One complication on SVG vs CSS: The CSS solution is to put the overflow text below the content-box of the element, regardless of whether or not the shape-inside fills up that entire content-box.

In SVG, at least as we're currently defining it, there is no direct equivalent of content-box. Shapes are defined relative to the view-box. Overflowing text below/beyond the view-box would normally mean overflowing it outside the SVG. It also means that multiple text elements would overflow into the same region. Which would basically be a big mess that serves neither aesthetic nor accessibility goals.

(And accessibility, to me, is the main concern: overflow will often be an issue if the user has set a minimum font size that is larger than what the designer intended. Aesthetics will inevitably bad if text is overflowing the shape, but we want it to still be readable!)

@nikosandronikos
Copy link
Member Author

So the outcome of the Sydney F2F discussion was to just overflow out of the shape for the basic case, and maybe add other options later? I'm finding the minutes to be confusing on this topic.
http://logs.csswg.org/irc.w3.org/css/2016-02-02/#e649639

@Tavmjong
Copy link
Contributor

Tavmjong commented Apr 6, 2016

The SVG 2 spec has been update. No behavior is defined for the moment but may in the future. It is suggested that an over flow shape be given in the 'shape-inside' value.

@Tavmjong Tavmjong closed this as completed Apr 6, 2016
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

3 participants