-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-rule-uri
- Loading branch information
Showing
32 changed files
with
1,913 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@siteimprove/alfa-style": minor | ||
--- | ||
|
||
**Added:** CSS shorthand property `mask` and corresponding longhand properties are now supported. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@siteimprove/alfa-css": minor | ||
--- | ||
|
||
**Added:** `List#cutOrExtend` is now available. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@siteimprove/alfa-css": minor | ||
--- | ||
|
||
**Added:** `List#size` is now available. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { Parser } from "@siteimprove/alfa-parser"; | ||
import { Box, Keyword, List } from "@siteimprove/alfa-css"; | ||
|
||
import { Longhand } from "../longhand.js"; | ||
import { Resolver } from "../resolver.js"; | ||
|
||
const { either } = Parser; | ||
|
||
type Specified = List<Specified.Item>; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export namespace Specified { | ||
export type Item = Box.CoordBox | Keyword<"no-clip">; | ||
} | ||
|
||
type Computed = Specified; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const parse = either(Box.parseCoordBox, Keyword.parse("no-clip")); | ||
|
||
const parseList = List.parseCommaSeparated(parse); | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const initialItem = Keyword.of("border-box"); | ||
|
||
/** | ||
* {@link https://developer.mozilla.org/en-US/docs/Web/CSS/mask-clip} | ||
* | ||
* @internal | ||
*/ | ||
export default Longhand.of<Specified, Computed>( | ||
List.of([initialItem]), | ||
parseList, | ||
(value, style) => value.map(Resolver.layers(style, "mask-image")), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { Keyword, List } from "@siteimprove/alfa-css"; | ||
|
||
import { Longhand } from "../longhand.js"; | ||
import { Resolver } from "../resolver.js"; | ||
|
||
type Specified = List<Specified.Item>; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export namespace Specified { | ||
export type Item = | ||
| Keyword<"add"> | ||
| Keyword<"subtract"> | ||
| Keyword<"intersect"> | ||
| Keyword<"exclude">; | ||
} | ||
|
||
type Computed = Specified; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const parse = Keyword.parse("add", "subtract", "intersect", "exclude"); | ||
|
||
const parseList = List.parseCommaSeparated(parse); | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const initialItem = Keyword.of("add"); | ||
|
||
/** | ||
* {@link https://developer.mozilla.org/en-US/docs/Web/CSS/mask-composite} | ||
* | ||
* @internal | ||
*/ | ||
export default Longhand.of<Specified, Computed>( | ||
List.of([initialItem], ", "), | ||
parseList, | ||
(value, style) => value.map(Resolver.layers(style, "mask-image")), | ||
); |
Oops, something went wrong.