GithubHelp home page GithubHelp logo

Comments (6)

nikosandronikos avatar nikosandronikos commented on July 26, 2024

SVG 1.1 'dominant-baseline' is based on the XSL 'dominant-baseline'. It includes additional values other than those currently in CSS Inline:

  1. 'use-script'
  2. 'no-change'
  3. 'reset-size'
  4. 'ideographic'
  5. 'middle'
  6. 'text-after-edge'
  7. 'text-before-edge'

from svgwg.

nikosandronikos avatar nikosandronikos commented on July 26, 2024

Could CSS add the currently unsupported options?

from svgwg.

AmeliaBR avatar AmeliaBR commented on July 26, 2024

CSS Inline Layout includes text-after-edge and text-before-edge as synonyms for text-bottom and text-top respectively for the alignment-baseline property, which may be supported in SVG implementations for backwards compatibility. It seems reasonable to extend that to dominant-baseline; the SVG WG could probably also ask for that may to be upgraded to a must without much pushback. The reason they changed the terminology (despite the fact that after/before is more general than top/bottom) is to match up with the existing CSS vertical-align property.

I don't know why ideographic is not preserved, although I think it usually works out as equivalent to text-bottom. Maybe we could ask for it to be added as an official synonym, too? middle exists in the latest CSS drafts for alignment-baseline, although I'm not sure that the wording is entirely consistent with SVG. I would strongly argue for it to be available for dominant-baseline. It's the best option for center-aligning lowercase text in SVG.

The other values are more complex from an implementation standpoint. We'd probably need some real-world use cases to convince CSS & user agents to join on. Do you have examples & a working implementation @Tavmjong ?

I would prefer to avoid SVG-specific terminology, but I also recognize that dominant-baseline is much more relevant in SVG text-around-an-anchor-point than in CSS text-in-a-box.

from svgwg.

nikosandronikos avatar nikosandronikos commented on July 26, 2024

CSS has a trimmed down list of baseline values. They have an open issue to check what's actually needed.
http://logs.csswg.org/irc.w3.org/css/2016-02-02/#e649804

Might be this action?
https://www.w3.org/Style/CSS/Tracker/actions/631

We should keep an eye on changes so we can review them when they happen.

from svgwg.

nikosandronikos avatar nikosandronikos commented on July 26, 2024

Waiting on w3c/csswg-drafts#201

from svgwg.

nikosandronikos avatar nikosandronikos commented on July 26, 2024

Added in w3c/csswg-drafts@fd68a2e

from svgwg.

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.