Re: [svgwg] Baseline information for contextual layout (#739)

Thank you, I hope it has some merit. I'm not quite sure I follow the idea of the valueless attribute - do you mean the item used for the external baseline identifies itself by some sort of marker attribute? Like this sort of thing?
```xml
<svg>
 <path d="..."/> <!-- complex path defining the shape -->
 <text i-am-the-horizontal-baseline="whatever" font="48px Times-Roman" x="0" y="22"/>
</svg>
```
I suppose there's not much between the two approaches. When you're linking into an HTML document with a fragment, and there are two items with the same fragment, the first takes precedence. The same approach would make sense here.

As for within the shadow tree, you mean this sort of case?
```xml
<svg>
 <defs>
  <text id="foo" i-am-the-horizontal-baseline="whatever" font="48px Times-Roman"/>
 </defs>
 <path d="..."/> <!-- complex path defining the shape -->
 <use id="bar" href="#foo" x="20" y="30"/>
 <use id="baz" href="#foo" x="20" y="50"/>
</svg>
```
In this case, if the element is announcing itself, it's a bit ambiguous - which copy do you want? The first seems to make the most sense.

Alternatively if the element is being referenced (say with  `<svg horizontal-baseline="foo">` then I think there's no ambiguity: the item with id "foo" is inside a `<defs>` which has `display: none`, so it has no position and therefore no baseline. Which, I guess, means there is an advantage to the use of a valueless attribute over referencing one by id.


-- 
GitHub Notification of comment by faceless2
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/739#issuecomment-534571390 using your GitHub account

Received on Tuesday, 24 September 2019 13:59:08 UTC