- From: David Dailey <ddailey@zoominternet.net>
- Date: Tue, 28 Jul 2015 18:33:18 -0400
- To: "'Koji Ishii'" <kojiishi@gmail.com>, "'Dirk Schulze'" <dschulze@adobe.com>
- Cc: "'Leonard Rosenthol'" <lrosenth@adobe.com>, "'Tab Atkins Jr.'" <jackalmage@gmail.com>, "'fantasai'" <fantasai.lists@inkedblade.net>, "'Jonathan Kew'" <jfkthame@gmail.com>, <www-style@w3.org>, "'SVG WG'" <w3c-svg-wg@w3.org>, "'Brady Duga'" <duga@google.com>, "'www-svg'" <www-svg@w3.org>
Monday, July 27, 2015 5:32 AM Koji Ishii replies To: Dirk Schulze > On Jul 27, 2015, at 5:42 PM, Dirk Schulze <dschulze@adobe.com> wrote: > >> On May 10, 2015, at 2:17 PM, Koji Ishii <kojiishi@gmail.com> wrote: >> >> After learned a bit of SVG, I understand this issue is more >> complicated than thought. >> >> Amelia and Leonard suggested that SVG wants to inherit when SVG is >> used to style text within HTML (e.g., decorative headings) cases. >> fantasai and I had a mind that SVG when used as an image should not >> inherit. I understand these are two separate use cases and desired >> behavior vary. > > In general an SVG image should be isolated from the context it is put in. This was a strong request that we got from security people in the past as well. > > There is a proposal to relay certain values/information into a SVG document which can be referenced within the SVG document (similar to CSS custom properties just that the property is set by the context the SVG image gets embedded to). Jonathan Watt from Mozilla presented this proposal to the SVG WG at a F2F in London at some point. This is probably the opt-in way you are talking about? > > However, in all other cases, the SVG context should be isolated from the host context for images. Both, SVG and HTML share the same context for inline SVG on the other hand. For iframe and embed it shouldn’t be any different than for HTML in an iframe. Thank you Dirk. I wasn’t clearly thinking about the differences in the context, your words made it clear. In short, I’m ok with what you said. TL;DR; considering the differences in context, we have 3 cases: 1. External document 2. Inline, but author thinks it’s an embedded image (the example was this case) 3. Inline, decorative headings etc. I have mild preference not to inherit in all 3 cases, because inheriting writing modes to a system that are not writing-mode-adaptive will simply break, and that was the original proposal. But inlining in vertical text should not be a major case that, if it requires special casing, I’m fine without it. /koji ------------------------- Interesting discussion, and I can see why the security folks would have ideas. I'm trying to think of situations in which I would like my SVG to inherit context (from less expressive but more mainstream environments like HTML, DocBook or RTF) and can come up with only a few at first glance: 1. An SVG in which we'd like to inherit text attributes from context (sorta like decorative headings, perhaps, but maybe other aspects of style) 2. Adaptive sizing to fit resizing of device's display window (resizing in browser or change of orientation in i-droid-gadgets). Geometricians may have preferences here that we would not like to leave to the people in marketing. 3. Events: mouse, accelerometer, etc. I've already discussed what I feel is a need and justification for HTML <img>, for example, to be able to allow SVG mouse events to be listened to, so as to trigger SVG related animations (including, presumably CSS) Much of these sorts of things can be handled within SVG's DOM through attribute="inherit" where the smaller object is instructed to listen to the context of its container, though it is rather remarkable to me how often inherit doesn't work when it (from authorial perspective) "ought" to. Regards David
Received on Tuesday, 28 July 2015 22:34:19 UTC