Difference between revisions of "SVG2"

From Inkscape Wiki
Jump to navigation Jump to search
m (Fixed spelling and grammar mistakes)
(Updated specification links and info)
 
Line 56: Line 56:
* Editor's Draft: The latest version not endorsed by the working group, frequent changes.
* Editor's Draft: The latest version not endorsed by the working group, frequent changes.
* Working Draft: The latest version endorsed by the working group.
* Working Draft: The latest version endorsed by the working group.
* Last Call
* Last Call Working Draft
* Candidate Recommendation
* Candidate Recommendation
* Proposed Recommendation
* Proposed Recommendation
Line 69: Line 69:
=== CSS Specifications (except Text): ===
=== CSS Specifications (except Text): ===


* [http://www.w3.org/TR/css3-animations/ CSS Animation] Working draft, some support in browsers.
* [https://www.w3.org/TR/css3-animations/ CSS Animation] Working draft, good browser support.
* [http://www.w3.org/TR/css3-color/ CSS Color Module Level 3] Recommendation, good browser support.
* [https://www.w3.org/TR/css3-color/ CSS Color Module Level 3] Recommendation, good browser support.
* [http://dev.w3.org/fxtf/compositing-1/ Compositing and Blending Level 1] Last Call, start of support in browsers.
* [https://www.w3.org/TR/compositing-1/ Compositing and Blending Level 1] Candidate Recommendation, starting browser support.
* [http://www.w3.org/TR/filter-effects/ Filter Effects Module Level 1] Mostly the same as SVG 1.1, good browser support.
* [https://www.w3.org/TR/filter-effects-1/ Filter Effects Module Level 1] Mostly the same as SVG 1.1, good browser support.
* [http://www.w3.org/TR/css-masking/ CSS Masking Module Level 1] Last Call.
* [https://www.w3.org/TR/css-masking-1/ CSS Masking Module Level 1] Candidate Recommendation, starting browser support.
* [http://www.w3.org/TR/css3-transforms/ CSS Transforms Module Level 1] Working Draft, some browser support.
* [https://www.w3.org/TR/css-transforms-1/ CSS Transforms Module Level 1] Working Draft, good browser support.
* [http://www.w3.org/TR/css3-transitions/ CSS Transitions] Working Draft, some browser support.
* [https://www.w3.org/TR/css3-transitions/ CSS Transitions] Working Draft, good browser support.
* [http://www.w3.org/TR/web-animations/ Web Animations] (Unified SMIL, CSS Animation model) Editor's Draft, initial work.
* [https://www.w3.org/TR/web-animations-1/ Web Animations] (Unified SMIL, CSS Animation model) Working Draft, starting browser support.


=== CSS Specifications: Text ===
=== CSS Specifications: Text ===


* [http://www.w3.org/TR/css3-fonts/ CSS Fonts Module Level 3] Candidate Recommendation
* [https://www.w3.org/TR/css-fonts-3/ CSS Fonts Module Level 3] Candidate Recommendation, some browser support.
* [http://www.w3.org/TR/css-text-decor-3/ CSS Text Decoration Module Level 3] Candidate Recommendation
* [https://www.w3.org/TR/css-text-decor-3/ CSS Text Decoration Module Level 3] Candidate Recommendation, some browser support.
* [http://www.w3.org/TR/css3-text/ CSS Text Module Level 3] Last Call
* [http://www.w3.org/TR/css3-text/ CSS Text Module Level 3] Last Call Working Draft, some browser support.
* [http://www.w3.org/TR/css3-writing-modes/ CSS Writing Modes] Last Call
* [http://www.w3.org/TR/css3-writing-modes/ CSS Writing Modes] Candidate Recommendation, some browser support.
* [http://www.w3.org/TR/css-shapes-1/ CSS Shapes Module Level 1] Last Call
* [https://www.w3.org/TR/css-shapes-1/ CSS Shapes Module Level 1] Candidate Recommendation, starting browser support.
* [http://dev.w3.org/csswg/css-shapes-2/ CSS Shapes Module Level 2] Editor's Draft (only for 'line-width').
* [https://drafts.csswg.org/css-shapes-2/ CSS Shapes Module Level 2] Editor's Draft, no browser support.
* [http://www.w3.org/TR/css3-ui/ CSS Basic User Interface Module Level 3] Working Draft
* [https://www.w3.org/TR/css-ui-3/ CSS Basic User Interface Module Level 3] Candidate Recommendation, some browser support.
* [http://dev.w3.org/csswg/css-exclusions/ CSS Exclusions Module Level 1] Working Draft
* [https://www.w3.org/TR/css3-exclusions/ CSS Exclusions Module Level 1] Working Draft, no browser support.
* [http://www.w3.org/TR/css3-linebox/ CSS Line Layout Module Level 3] Editor's Draft (Note: Working Draft is from 2002 and should be ignored)
* [https://www.w3.org/TR/css3-linebox/ CSS Line Layout Module Level 3] Working Draft, starting browser support.

Latest revision as of 13:53, 14 February 2017

SVG 2 Planning

SVG 2 will offer many things to Inkscape:

  • Mesh Gradients
  • Hatch Fills
  • Arbitrary stroke/fill/marker order
  • Arcs line join
  • Auto-flowed text
  • New blending and compositing modes.
  • Use of blending and compositing outside of filters.
  • Marker inheriting stroke color, etc.
  • Etc.

It is important that Inkscape implements these features in a timely fashion. Not only will it be a benefit to our users... but it is a necessary step to insuring that these features remain in SVG 2. The W3C specification process requires at least two independent implementations of feature before final publication. Having Inkscape support these features not only will provide one of the implementations but it demonstrates to others that there is serious interest in these features.

We do need to be careful, though, to avoid the Flowed Text of SVG 1.2 debacle. Until the SVG 2 specification (or relevant CSS specification) is in the final stages of adoption, each new feature must be developed in the 'inkscape' name space; that is to say, the '-inkscape-' prefix must be used for new elements, attributes, and properties. It is also important that, until SVG 2 is widely supported, we support export to SVG 1.1 or clearly mark that a feature is supported only by SVG 2.

Many SVG 2 features can be supported internally as SVG 2. For example, Inkscape currently uses 1-stop gradients for color palettes. On reading in, a one-stop gradient can be converted to a <solidColor> element. On writing out, if SVG 1.1 output is selected, the <solidColor> element can be converted back to a 1-stop gradient. An SVG 2 <hatch> element can be converted to a <pattern> large enough to cover the fill area. SVG 2 flowed text provides a natuaral fallback for SVG 1.1 renderers. A tab in the Preferences dialog could handle fine grain control of which SVG 2 features should be converted.

Note, no browser seems to handles the <switch> element correctly so we should not rely on this feature.

Implementation

  • Framework
  1. On read-in, convert SVG 1.1 to SVG 2
    1. 1-stop gradients -> <solidColor>
    2. Flowed text -> CSS wrapped text
    3. Etc.
  2. Edit as SVG 2
  3. On writing-out, convert SVG 2, if requested to SVG 1.1 (controlled by preferences)
    1. <solidColor> -> 1-stop gradient
    2. HSL color -> RGB color
    3. Hatch -> Pattern (keeping hatch editing data)
    4. Mesh -> Bitmap (keeping mesh editing data)
    5. CSS Blend -> Filter blend
    6. CSS Wrapped text -> SVG 1.1 text (via auto-fallback mechanism)
    7. Paint order -> <use>
    8. Etc.
  • Status
    • HSL Color. Requires some parsing work. Specification stable. Supported by browsers.
    • <solidColor>. Specification stable (from SVG 1.2 Tiny). Supported by Opera (Presto).
    • Hatches. Specification stable. No browser support.
    • Mesh gradients: Specification fairly stable (possible work on smoothing). Basic code in Inkscape. Needs work on GUI and PNG fallback. No browser support.
    • CSS Blend modes: Specification fairly stable. Code in Inkscape. Needs GUI and filter-base fallback. Firefox/Chrome have some support.
    • CSS Text-Wrap: Need to convert from SVG 1.2 flowed text. Specification influx. Firefox supports wrapping via 'white-space'.
    • Paint order. In specification, should be stable. No browser support.

Resources

There may be multiple versions of each specification, each represents a particular snap-shot during specification writing. In order of maturity:

  • Editor's Draft: The latest version not endorsed by the working group, frequent changes.
  • Working Draft: The latest version endorsed by the working group.
  • Last Call Working Draft
  • Candidate Recommendation
  • Proposed Recommendation
  • Recommendation

See the CSS Current Work page for more details. During the writing process, the top of each specification has links to the various versions.

SVG 2 Specification

CSS Specifications (except Text):

CSS Specifications: Text