Open Bug 1381788 Opened 3 years ago Updated 2 years ago
Fix example code: SVG property 'alignment-baseline' is not valid for text nodes
:: 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
You need to log in before you can comment on or make changes to this bug.