Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

relnote(116): SVG q unit supported (defined in CSS length units) #27950

Merged
merged 6 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions files/en-us/mozilla/firefox/releases/116/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ This article provides information about the changes in Firefox 116 that affect d

### SVG

- The [`q`](/en-US/docs/Web/SVG/Content_type#length) length unit (`1q = 1/40th of 1cm`) is now supported ([Firefox bug 1836995](https://bugzil.la/1836995)).
bsmth marked this conversation as resolved.
Show resolved Hide resolved

#### Removals

### HTTP
Expand Down
25 changes: 12 additions & 13 deletions files/en-us/web/svg/content_type/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,34 +186,33 @@ SVG makes use of a number of data types. This article lists these types along wi

SVG supports two types of _IRI_ references:

- **local _IRI_ references**, where the IRI reference does not contain an `<absoluteIRI>` or `<relativeIRI>` and thus only contains a fragment identifier (i.e., `#<elementID>` or `#xpointer(id<elementID>)`).
- **non-local _IRI_ references**, where the _IRI_ reference does contain an `<absoluteIRI>` or `<relativeIRI>`.
- **local _IRI_ references**, where the IRI reference does not contain an \<absoluteIRI> or \<relativeIRI> and thus only contains a fragment identifier (i.e., `#<elementID>` or `#xpointer(id<elementID>)`).
- **non-local _IRI_ references**, where the _IRI_ reference does contain an \<absoluteIRI> or \<relativeIRI>.

For the full specification of IRI references in SVG, see [SVG 1.1 (2nd Edition): IRI references](https://www.w3.org/TR/SVG/linking.html#IRIReference).

## Length

- \<length>

- : A length is a distance measurement, given as a number along with a unit. Lengths are specified in one of two ways. When used in a stylesheet, a \<length> is defined as follows:
- : A length is a distance measurement, given as a number along with a unit.
SVG follows the [CSS Values and Units Module](https://www.w3.org/TR/css-values-3/) for the definitions of common units and their meanings.
For example:

```plain
length ::= number (~"em" | ~"ex" | ~"px" | ~"in" | ~"cm" | ~"mm" | ~"pt" | ~"pc")?
length ::= <number> (<absolute-length> | <relative-length>)?
```

[See the CSS2 specification](https://www.w3.org/TR/2008/REC-CSS2-20080411/syndata.html#length-units) for the meanings of the unit identifiers.
For more details, see the CSS specification for [Relative length units](https://drafts.csswg.org/css-values/#relative-lengths) and [Absolute length units](https://drafts.csswg.org/css-values/#absolute-lengths) and the [\<length>](/en-US/docs/Web/CSS/length) CSS data type.
bsmth marked this conversation as resolved.
Show resolved Hide resolved
bsmth marked this conversation as resolved.
Show resolved Hide resolved

For properties defined in CSS2, a length unit identifier must be provided. For length values in SVG-specific properties and their corresponding presentation attributes, the length unit identifier is optional. If not provided, the length value represents a distance in the current user coordinate system. In presentation attributes for all properties, whether defined in SVG1.1 or in CSS2, the length identifier, if specified, must be in lower case.
For properties defined in CSS Values and Units, a length unit identifier must be provided.

When lengths are used in an SVG attribute, a \<length> is instead defined as follows:
For properties that are SVG-specific and their corresponding presentation attributes, the length unit identifiers in length values are optional. If not provided, the length value represents a distance in the current user coordinate system. In presentation attributes for all properties, whether defined in SVG or in CSS, the length identifier, if specified, must be in lower case.
hamishwillee marked this conversation as resolved.
Show resolved Hide resolved

```plain
length ::= number ("em" | "ex" | "px" | "in" | "cm" | "mm" | "pt" | "pc" | "%")?
```

The unit identifiers in such \<length> values must be in lower case.
When used in an SVG attribute, the unit identifiers in length values must be in lower case.

Note that the non-property \<length> definition also allows a percentage unit identifier. The meaning of a percentage length value depends on the attribute for which the percentage length value has been specified. Two common cases are:
Note that the non-property \<length> definition also allows a percentage (`%`) unit identifier.
The meaning of a percentage length value depends on the attribute for which the percentage length value has been specified. Two common cases are:

- when a percentage length value represents a percentage of the viewport width or height
- when a percentage length value represents a percentage of the bounding box width or height on a given object.
Expand Down