Closed Bug 1381788 Opened 7 years ago Closed 4 years ago

Fix example code: SVG property 'alignment-baseline' is not valid for text nodes

Categories

(Developer Documentation Graveyard :: SVG, defect, P5)

All
Other
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: u598784, Unassigned)

References

()

Details

:: Developer Documentation Request

      Request Type: Correction
     Gecko Version: 55 Branch
 Technical Contact: 

:: Details

There are two problems here. First of all the example given in the MDN article https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/alignment-baseline does not comply to the decription itself. Regarding the W3C standard, the text description seems to be right. In the example tspan elements should be used within the text nodes.

Second part of the problem is, that Firefox does obviously not is aware of an attribute or css property 'alignment-baseline'. 'dominant-baseline' (for text nodes) is processed nicely by Firefox, that is quite close to the usecase.
I noticed this issue too. I updated the https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/dominant-baseline documentation to use the alignment-baseline example translated for dominant-baseline. 

However, I'm not skilled enough in SVG to create a good example of <textPath> for alignment-baseline.
Hey absynce!

Took me a minute to remember what I reported here, how it is now it is fine. To testdrive 'alignment-baseline', it would be enough to have a blank <text> node containing <tspan> with the actual text and the alignment-baseline attribute, as the property should also apply to tspan, not just textPath.

However, no change needed, Firefox still does not know that 'alignment-baseline' exists, that's why the sample is most usable like it is yet :-)

See also: https://www.w3.org/TR/SVG/text.html#AlignmentBaselineProperty

I think case closed. Thanks for having a look into.

Cheers
MDN Web Docs' bug reporting has now moved to GitHub. From now on, please file content bugs at https://github.com/mdn/sprints/issues/ and platform bugs at https://github.com/mdn/kuma/issues/.
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.