Fix broken links

This also introduces a number of workarounds for tcort/markdown-link-check#255
This commit is contained in:
Natalie Weizenbaum 2023-04-12 17:25:26 -07:00
parent 7d0c8c22f0
commit 8bcdee76ee
18 changed files with 82 additions and 81 deletions

View File

@ -120,7 +120,7 @@ combinators*) as well as a sequence of [complex selector components]. Either,
but not both, of these sequences may be empty~~
[visible combinators]: #visible-combinator
[complex selector components]: #complex-selector-components
[complex selector components]: #complex-selector-component
A *complex selector* is an optional [visible combinator] (its *leading
combinator*) as well as a sequence of [complex selector components]. The

View File

@ -151,15 +151,17 @@ To serialize a number to CSS:
* If the number is degenerate, [convert it to a calculation] then serialize that
to CSS.
[convert it to a calculation]: ../spec/types/number.md#converting-a-number-to-a-calculation
* Otherwise:
* Emit a string that can be parsed as a [`<number-token>`] with the
same value as the number.
[`<number-token>`]: https://www.w3.org/TR/css-syntax-3/#typedef-number-token
* If the number has a numerator unit, emit that unit.
[`<number-token>`]: https://www.w3.org/TR/css-syntax-3/#typedef-number-token
## Procedures
### Converting a Number to a Calculation

View File

@ -108,7 +108,7 @@ The [`SpecialFunctionName`] production will be changed to the following:
The [`CalcValue`] production will be changed to the following:
[`CalcValue`]: ../spec/syntax.md#minmaxexpression
[`CalcValue`]: ../spec/types/calculation.md#calculationexpression
<x><pre>
**CalcValue** ::= CalcValue (('+' | '-' | '*' | '/') CalcValue)+

View File

@ -307,7 +307,7 @@ Two numbers are *definitely-incompatible* if they are not possibly-compatible.
Replace the definition of [special number string] with the following definition:
[special number string]: ../spec/functions.md#special-number-string
[special number string]: ../spec/functions.md#special-number
A *special number* is either:
@ -393,7 +393,7 @@ case-insensitively.
This proposal replaces the reference to `CalcValue` in the definition of
[`CssMinMax`] with `CalcArgument`.
[`CssMinMax`]: ../spec/syntax.md#minmaxexpression
[`CssMinMax`]: ../spec/types/calculation.md#cssminmax
> Note that this increases the number of cases where a `MinMaxExpression` will
> be parsed as a `CssMinMax` rather than a `FunctionExpression` (for example,
@ -520,14 +520,13 @@ This algorithm takes a calculation `calc` and returns a number or a calculation.
calling [`math.min()`], [`math.max()`], or `math.clamp()` (respectively)
with those arguments.
[compatible]: ../spec/types/number.md#compatible-units
[`math.min()`]: ../spec/built-in-modules/math.md#min
[`math.max()`]: ../spec/built-in-modules/math.md#max
* Otherwise, if any two of those arguments are [definitely-incompatible],
throw an error.
[definitely-incompatible]: #possibly-compatible-numbers
[compatible]: ../spec/types/number.md#compatible-units
[`math.min()`]: ../spec/built-in-modules/math.md#min
[`math.max()`]: ../spec/built-in-modules/math.md#max
[definitely-incompatible]: #possibly-compatible-numbers
* Otherwise, return a calculation with the same name as `calc` and `arguments`
as its arguments.

View File

@ -85,7 +85,7 @@ instead became fixed-size, and only guaranteed to be fully accurate up to 53
bits.
In addition to the specific details of numeric representation, Ruby Sass papered
over floating-point numbers' [accuracy issues] by defining a heuristic for
over floating-point numbers' accuracy issues by defining a heuristic for
determining when similar numbers were considered equivalent to Sass's logic.
This heuristic has persisted relatively unchanged through to modern
implementations, but it introduces a problematic [intransitivity] in Sass's
@ -269,7 +269,7 @@ Define the value type known as a *number* as three components:
* A list of strings called *numerator units*.
* A list of strings called *denominator units*.
[double]: #doubles
[double]: #double
Several shorthands exist when referring to numbers:
@ -378,11 +378,12 @@ Let `n1` and `n2` be two numbers. To determine `n1 % n2`:
> specification because it was originally inherited from Ruby when that was
> used for Sass's original implementation.
>
> [floored division]: https://en.wikipedia.org/wiki/Modulo_operation#Variants_of_the_definition
>
> Note: These comparisons are not the same as `c2 < 0` or `remainder == 0`,
> because they don't do fuzzy equality.
[floored division]: https://en.wikipedia.org/wiki/Modulo_operation#Variants_of_the_definition
* Otherwise, return `result`.
#### Negation
@ -416,14 +417,16 @@ It returns a number with the given units. It's written "convert `number` to
* Let `v1` and `v2` be the values of `u1` and `u2`'s [conversion factors].
[conversion factors]: ../spec/types/number.md#conversion-factors
* Set `value` to `division(multiplication(value, v1), v2)` as defined by
[IEEE 754 2019], §5.4.1.
[conversion factors]: ../spec/types/number.md#conversion-factors
* For each pair of units `u1`, `u2` in the [denominator compatibility map]
between `number` and `units` such that `u1 != u2`:
[denominator compatibility map]: #compatible-units
* Let `v1` and `v2` be the values of `u1` and `u2`'s [conversion factors].
* Set `value` to `division(multiplication(value, v2), v1)` as defined by
@ -445,7 +448,7 @@ and `n2` allowing unitless".
* Return `n1` and the result of [converting `n2` to `n1`'s units].
[converting `n1` to `n2`'s units]: #converting-a-number-to-units
[converting `n2` to `n1`'s units]: #converting-a-number-to-units
### Simplifying a Number

View File

@ -76,7 +76,7 @@ all identifiers matched case-insensitively):
&#32; | '(' MediaInParens (MediaAnd* | MediaOr*) ')'
</pre></x>
[InterpolatedIdentifier]: ../syntax.md#interpolatedidentifier
[InterpolatedIdentifier]: ../spec/syntax.md#interpolatedidentifier
[\<mf-comparison>]: https://drafts.csswg.org/mediaqueries-4/#typedef-mf-comparison
[\<mf-lt>]: https://drafts.csswg.org/mediaqueries-4/#typedef-mf-lt
[\<mf-gt>]: https://drafts.csswg.org/mediaqueries-4/#typedef-mf-gt

View File

@ -484,7 +484,7 @@ A *color* is an object with several parts:
> meaningless, and can be clamped by input functions when generating a color.
[known color space]: #known-color-space
[double]: ../types/number.md#double
[double]: ../spec/types/number.md#double
### Legacy Color
@ -748,8 +748,7 @@ is the result of [looking up a known color space] named by either the
To serialize a non-legacy color `color`:
* Let `space-name` be an unquoted lowercase string of `color`'s [color space]
name.
* Let `space-name` be an unquoted lowercase string of `color`'s space name.
* Let `known-space` be the result of [looking up a known color space] with a
`name` of `space-name`.
@ -883,12 +882,11 @@ The individual conversion algorithms are:
### Gamut Mapping
> Some [known color space]s describe limited [color gamuts](#color-gamuts).
> If a color is 'out of gamut' for a particular space (most often because of
> conversion from a larger-gamut color-space), it can be useful to 'map' that
> color to the nearest available 'in-gamut' color. Gamut mapping is the process
> of finding an in-gamut color with the least objectionable change in visual
> appearance.
> Some [known color space]s describe limited color gamuts. If a color is 'out of
> gamut' for a particular space (most often because of conversion from a
> larger-gamut color-space), it can be useful to 'map' that color to the nearest
> available 'in-gamut' color. Gamut mapping is the process of finding an
> in-gamut color with the least objectionable change in visual appearance.
Gamut mapping in Sass follows the [CSS gamut mapping algorithm][css-mapping].
This procedure accepts a color `origin`, and a [known color space]
@ -1012,12 +1010,12 @@ The procedure is:
* Let `expected` be the number of channels in `space`.
* If any element of `channels` is not either a number, a special variable
string, a special number string, or an unquoted string that's
string, a [special number], or an unquoted string that's
case-insensitively equal to 'none', throw an error.
* If `alpha` is null, let `alpha` be `1`.
* Otherwise, If `alpha` is not a [special number string]:
* Otherwise, If `alpha` is not a [special number]:
* If `alpha` is a number, set `alpha` to the result of
[percent-converting] `alpha` with a max of 1, and then clamping the value
@ -1026,9 +1024,9 @@ The procedure is:
* Otherwise, throw an error.
* If `channels` is a [special variable string], or if `alpha` is a [special
number string], return an unquoted string with the value of `input`.
number], return an unquoted string with the value of `input`.
* If any element of `channels` is a [special number string]:
* If any element of `channels` is a [special number]:
* If `space` is a [legacy color] space:
@ -1054,7 +1052,7 @@ The procedure is:
* Return `space-name`, `channels` channels, and `alpha` alpha value.
[special variable string]: ../spec/functions.md#special-variable-string
[special number string]: ../spec/functions.md#special-number-string
[special number]: ../spec/functions.md#special-number
[percent-converting]: #percent-converting-a-number
### Percent-Converting a Number
@ -1434,14 +1432,14 @@ to-space($color, $space)
* Let `known-space` be the result of [looking up a known color space] named
`$space`.
* Let `known-origin` be `$color`'s [color space].
* Let `known-origin` be `$color`'s space.
* If `known-origin == known-space`, return `$color`.
* Let `converted` be the result of [converting] the `origin-color` `$color` to
the `target-space` `known-space`.
* If `converted` is a [legacy] color:
* If `converted` is a [legacy color]:
* For each `component` in the channels and alpha value of `converted`, if
`component` is [missing], set `component` to `0`.
@ -1562,8 +1560,8 @@ channel($color, $channel, $space: null)
* Let `value` be the channel value in `color` with name of `channel`.
* Let `unit` be the unit associated with `channel` in `color`'s [color space],
if defined, and `null` otherwise.
* Let `unit` be the unit associated with `channel` in `color`'s space, if
defined, and `null` otherwise.
* If `value` is `null`, return `0`.
@ -1677,7 +1675,7 @@ This function is also available as a global function named `change-color()`.
* Let `color` be the value of `$color`.
* Let `origin-space` be `color`'s [color space].
* Let `origin-space` be `color`'s space.
* If the keyword argument `$space` is specified in `$args`:
@ -1754,7 +1752,7 @@ This function is also available as a global function named `adjust-color()`.
* Let `color` be the value of `$color`.
* Let `origin-space` be `color`'s [color space].
* Let `origin-space` be `color`'s space.
* If the keyword argument `$space` is specified in `$args`:

View File

@ -68,8 +68,8 @@ Adjust the list of productions that should produce errors as follows:
> trailing combinators that _don't_ have nested rules will produce warnings.
> Those with nested rules will produce errors since Sass never parsed them
> successfully in the first place.
>
> [bogus combinators]: ../accepted/bogus-combinators.md
[bogus combinators]: ../accepted/bogus-combinators.md
Add the following to the list of parsing differences:
@ -103,26 +103,25 @@ To execute a style rule `rule`:
* If there is a [current style rule]:
[current style rule]: ../spec/style-rules.md#current-style-rule
* If `selector` contains one or more parent selectors, replace them with the
current style rule's selector and set `selector` to the result.
* Otherwise, nest `selector` within the current style rule's selector using
the [descendant combinator] and set `selector` to the result.
[descendant combinator]: https://www.w3.org/TR/selectors-3/#descendant-combinators
* Otherwise, if `selector` contains one or more parent selectors, throw an
error.
[current style rule]: ../spec/style-rules.md#current-style-rule
[descendant combinator]: https://www.w3.org/TR/selectors-3/#descendant-combinators
* Let `css` be a CSS style rule with selector `selector`.
* Execute each child `child` of `rule`.
* If `css` contains any children and `selector` is [bogus], throw an error.
[bogus]: selectors.md#bogus-selector
[bogus]: ../spec/selectors.md#bogus-selector
* Remove any [complex selectors][] containing a placeholder selector that
begins with `-` or `_` from `css`'s selector.
@ -141,7 +140,7 @@ To execute a style rule `rule`:
* Otherwise, append `css` to [the current module]'s CSS.
[the current module]: spec.md#current-module
[the current module]: ../spec/spec.md#current-module
## Serialization

View File

@ -26,8 +26,8 @@ still supported for backwards-compatibility.
**ImportUrl** ::= QuotedString | [InterpolatedUrl][]
</pre></x>
[InterpolatedIdentifier]: ../syntax.md#InterpolatedIdentifier
[InterpolatedUrl]: ../syntax.md#InterpolatedUrl
[InterpolatedIdentifier]: ../syntax.md#interpolatedidentifier
[InterpolatedUrl]: ../syntax.md#interpolatedurl
[MediaFeatureInParens]: media.md#syntax
[MediaQueryList]: media.md#syntax
@ -150,6 +150,7 @@ To execute an `@import` rule `rule`:
> Members from `imported` override members of the same name and type that
> have already been added to `import` and `module`.
[`MediaQueryList`]: media.md#syntax
[the current module]: ../spec.md#current-module
[loading the file]: ../modules.md#loading-a-source-file
[current source file]: ../spec.md#current-source-file

View File

@ -277,7 +277,7 @@ acos($number)
* Return the result of [converting `result` to `deg`].
[converting `result` to `deg`]: ../spec/types/number.md#converting-a-number-to-a-unit
[converting `result` to `deg`]: ../types/number.md#converting-a-number-to-a-unit
#### `asin()`
@ -334,7 +334,7 @@ cos($number)
* Let `double` be the value of [converting `$number` to `rad`] allowing
unitless.
[converting `$number` to `rad`]: #converting-a-number-to-units
[converting `$number` to `rad`]: ../types/number.md#converting-a-number-to-a-unit
* Return a unitless number whose value is the result of `cos(double)` as defined
by [IEEE 754 2019], §9.2.
@ -348,8 +348,6 @@ sin($number)
* Let `double` be the value of [converting `$number` to `rad`] allowing
unitless.
[converting `$number` to `rad`]: #converting-a-number-to-units
* Return a unitless number whose value is the result of `sin(double)` as defined
by [IEEE 754 2019], §9.2.
@ -362,8 +360,6 @@ tan($number)
* Let `double` be the value of [converting `$number` to `rad`] allowing
unitless.
[converting `$number` to `rad`]: #converting-a-number-to-units
* Return a unitless number whose value is the result of `tan(double)` as defined
by [IEEE 754 2019], §9.2.

View File

@ -49,8 +49,10 @@ calc-args($calc)
* If `arg` is a number or a calculation, add it to `args`.
* Otherwise, [serialize](#serialization) `arg` and add the result to `args` as
an unquoted string.
* Otherwise, [serialize] `arg` and add the result to `args` as an unquoted
string.
[serialize]: ../types/calculation.md#serialization
* Return `args` as an unbracketed comma-separated list.
@ -303,7 +305,7 @@ load-css($url, $with: null)
* Let `css` be the result of [resolving `module`'s extensions][].
[resolving `module`'s extensions]: ../at-rules/extend.md#resolving-a-modules-extension
[resolving `module`'s extensions]: ../at-rules/extend.md#resolving-a-modules-extensions
> This means that, if a module loaded by `load-css()` shares some dependencies
> with the entrypoint module, those dependencies' CSS will be included twice.

View File

@ -83,7 +83,7 @@ This function is also available as a global function named `selector-extend()`.
* Let `selector`, `extendee`, and `extender` be the result of [parsing a
selector from] `$selector`, `$extendee`, and `$extender`, respectively.
[parsing a selector from]: #parsing-a-selector-from-a-sassscript-object
[parsing a selector from]: #parse-a-selector-from-a-sassscript-object
* If any of `selector`, `extendee`, or `extender` is [bogus], throw an error.
@ -133,8 +133,6 @@ This function is also available as a global function named `selector-replace()`.
* Let `selector`, `original`, and `replacement` be the result of [parsing a
selector from] `$selector`, `$original`, and `$replacement`, respectively.
[parsing a selector from]: #parsing-a-selector-from-a-sassscript-object
* If any of `selector`, `original`, or `replacement` is [bogus], throw an error.
[bogus]: ../selectors.md#bogus-selector

View File

@ -70,7 +70,7 @@ matching is case-insensitive.
and the `ArgumentInvocation`. It may not start with [`SpecialFunctionName`],
`'calc('`, or `'clamp('` (case-insensitively).
[`SpecialFunctionName`]: #specialfunctionexpression
[`SpecialFunctionName`]: syntax.md#specialfunctionexpression
<x><pre>
**FunctionCall** ::= [NamespacedIdentifier][] ArgumentInvocation

View File

@ -268,14 +268,14 @@ This algorithm takes a string `argument` and [configuration](#configuration)
was passed the first time `file` was executed by the [Loading a Module]
procedure, throw an error.
> An ID may be reused in a new configuration via [`@forwards .. with`].
[`@forwards .. with`]: ../spec/at-rules/forward.md#semantics
> An ID may be reused in a new configuration via [`@forward ... with`].
* Otherwise, return the module that execution produced.
[Loading a Module]: #loading-a-module
[`@forward ... with`]: at-rules/forward.md#semantics
* If `file` is currently being executed, throw an error.
> This disallows circular `@use`s, which ensures that modules can't be used

View File

@ -29,7 +29,7 @@ component sequence may be empty only for complex selectors with leading
combinators.
[visible combinator]: #visible-combinator
[complex selector components]: #complex-selector-components
[complex selector components]: #complex-selector-component
### Complex Selector Component

View File

@ -227,12 +227,11 @@ This algorithm takes a calculation `calc` and returns a number or a calculation.
* If those arguments' are mutually [compatible], return the result of calling
`math.clamp()` with those arguments.
[compatible]: ../spec/types/number.md#compatible-units
* Otherwise, if any two of those arguments are [definitely-incompatible],
throw an error.
[definitely-incompatible]: #possibly-compatible-numbers
[compatible]: number.md#compatible-units
[definitely-incompatible]: number.md#possibly-compatible-numbers
* If `calc`'s name is `"min"` or `"max"` and `arguments` are all numbers:
@ -240,9 +239,6 @@ This algorithm takes a calculation `calc` and returns a number or a calculation.
[`math.min()`] or [`math.max()`] (respectively) with those arguments. If
this doesn't throw an error, return its result.
[`math.min()`]: ../spec/built-in-modules/math.md#min
[`math.max()`]: ../spec/built-in-modules/math.md#max
> `min()` and `max()` allow unitless numbers to be mixed with units because
> they need to be backwards-compatible with Sass's old global `min()` and
> `max()` functions.
@ -250,6 +246,9 @@ This algorithm takes a calculation `calc` and returns a number or a calculation.
* Otherwise, if any two of those arguments are [definitely-incompatible],
throw an error.
[`math.min()`]: ../built-in-modules/math.md#min
[`math.max()`]: ../built-in-modules/math.md#max
* Otherwise, return a calculation with the same name as `calc` and `arguments`
as its arguments.

View File

@ -112,7 +112,7 @@ Two numbers' units are said to be *compatible* if both:
* There's the same type of mapping between those numbers' denominator units.
This mapping is known as the numbers' *denominator compatibility map*.
[conversion factor]: ../spec/types/number.md#conversion-factors
[conversion factor]: #conversion-factors
Similarly, a number is *compatible with* a [set of units] if it's compatible
with a number that has those units; and two sets of units are *compatible* if a
@ -356,11 +356,11 @@ Let `n1` and `n2` be two numbers. To determine `n1 % n2`:
> specification because it was originally inherited from Ruby when that was
> used for Sass's original implementation.
>
> [floored division]: https://en.wikipedia.org/wiki/Modulo_operation#Variants_of_the_definition
>
> Note: These comparisons are not the same as `c2 < 0` or `remainder == 0`,
> because they don't do fuzzy equality.
[floored division]: https://en.wikipedia.org/wiki/Modulo_operation#Variants_of_the_definition
* Otherwise, return `result`.
#### Negation
@ -379,15 +379,17 @@ To serialize a number to CSS:
* If the number is degenerate, [convert it to a calculation] then serialize that
to CSS.
[convert it to a calculation]: #converting-a-number-to-a-calculation
* Otherwise:
* Emit a string that can be parsed as a [`<number-token>`] with the
same value as the number.
[`<number-token>`]: https://www.w3.org/TR/css-syntax-3/#typedef-number-token
* If the number has a numerator unit, emit that unit.
[`<number-token>`]: https://www.w3.org/TR/css-syntax-3/#typedef-number-token
## Procedures
### Converting a Number to a Unit
@ -413,14 +415,16 @@ It returns a number with the given units. It's written "convert `number` to
* Let `v1` and `v2` be the values of `u1` and `u2`'s [conversion factors].
[conversion factors]: ../spec/types/number.md#conversion-factors
* Set `value` to `division(multiplication(value, v1), v2)` as defined by
[IEEE 754 2019], §5.4.1.
[conversion factors]: #conversion-factors
* For each pair of units `u1`, `u2` in the [denominator compatibility map]
between `number` and `units` such that `u1 != u2`:
[denominator compatibility map]: #compatible-units
* Let `v1` and `v2` be the values of `u1` and `u2`'s [conversion factors].
* Set `value` to `division(multiplication(value, v2), v1)` as defined by
@ -442,7 +446,7 @@ and `n2` allowing unitless".
* Return `n1` and the result of [converting `n2` to `n1`'s units].
[converting `n1` to `n2`'s units]: #converting-a-number-to-units
[converting `n2` to `n1`'s units]: #converting-a-number-to-a-unit
### Simplifying a Number
@ -462,7 +466,7 @@ number with simplified units.
* Return the result of [converting `number` to `newUnits`].
[converting `number` to `newUnits`]: #converting-a-number-to-units
[converting `number` to `newUnits`]: #converting-a-number-to-a-unit
### Converting a Number to a Calculation

View File

@ -51,7 +51,7 @@ To execute a `VariableDeclaration` `declaration`:
* Let `resolved` be the result of [resolving a variable][] named `name`.
[resolving a variable]: ../spec/modules.md#resolving-a-member
[resolving a variable]: modules.md#resolving-a-member
* If `name` is a `NamespacedVariable` and `declaration` has a `!global` flag,
throw an error.