Skip to content

Commit c14ae06

Browse files
authored
Add an issue template to suggest CSS syntax patches (#1760)
Goal is to have a formatted structure to gather the information we need. That structure could perhaps be leveraged later on to automate the creation of a pull request afterwards (as done for specs in browser-specs).
1 parent f5dd906 commit c14ae06

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CSS syntax patch
2+
description: Use this template to suggest a correction to the syntax of a CSS construct
3+
labels: ["css extracts", "patch"]
4+
title: "Add CSS syntax patch for: `@@`"
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
> [!Important]
10+
Please replace `@@` in the title with the name of the CSS at-rule, property, selector, function, type or descriptor to patch. The name should typically appear in a CSS extract in [`ed/css`](https://github.com/w3c/webref/tree/main/ed/css).
11+
Function names should end with `()`. Types should be enclosed in `<>`. You may provide additional context if there's some ambiguity, using a `/`-based path.
12+
For example: `rgb()`, `<palette-identifier>`, `stop-color`, or `@page/page/<page-size>`
13+
14+
- type: input
15+
id: url
16+
attributes:
17+
label: Link to the definition in the spec
18+
description: |
19+
Where is the CSS construct and its syntax defined?
20+
This URL should be a link to the relevant version of the spec and include a fragment.
21+
For example: `https://drafts.csswg.org/css-fonts-4/#typedef-font-palette-palette-identifier`
22+
value: "https://"
23+
validations:
24+
required: true
25+
26+
- type: textarea
27+
id: syntax
28+
attributes:
29+
label: Syntax of the CSS construct
30+
description: |
31+
What should the syntax this CSS construct be?
32+
Leave the field blank if you're not sure.
33+
Note Webref captures what specs define. The syntax should not contain historical tokens that are no longer in the spec or proprietary extensions.
34+
render: code
35+
validations:
36+
required: false
37+
38+
- type: textarea
39+
id: notes
40+
attributes:
41+
label: Notes
42+
description: |
43+
Anything else we should know about the construct and syntax?
44+
For example, did it exist in [`mdn/data`](https://github.com/mdn/data) or some other source?
45+
Would it be worth making the syntax more explicit in the spec?
46+
Is the syntax defined in one spec and extended elsewhere?
47+
validations:
48+
required: false

ed/csspatches/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The folder contains two types of patches applied to the CSS extracts scraped from specs during curation to produce the `@webref/css` package:
44

5-
- The [`syntax-patches.js`](./syntax-patches.js) file contains a list of syntaxes for situations where that syntax cannot be automatically extracted from the underlying spec because it is defined in non-machine-readable prose. These patches are usually permanent in that they cover situations where it is unlikely that the underlying spec will be updated to make the syntax more explicit.
5+
- The [`syntax-patches.js`](./syntax-patches.js) file contains a list of syntaxes for situations where that syntax cannot be automatically extracted from the underlying spec because it is defined in non-machine-readable prose. These patches are usually permanent in that they cover situations where it is unlikely that the underlying spec will be updated to make the syntax more explicit. To propose a new syntax patch, please use the [dedicated issue template](https://github.com/w3c/webref/issues/new?template=css-syntax-patch.yml).
66
- The `*.json.patch` files contains extract file patches applied to CSS extracts. These patches are intended to be temporary while the spec gets fixed, and are typically associated with an issue or pull request raised against the underlying spec. These patches typically break as specs get updated. For details on how to create and update file patches, please see the [Web IDL patches documentation](../idlpatches/README.md).
77

88
On top of these patches, note that curation also drops duplicate definitions through the [`tools/drop-css-property-duplicates.js`](../../tools/drop-css-property-duplicates.js) script which handles situations where definitions in one spec override definitions in another spec (for example, definitions in CSS modules overrride definitions in CSS 2).

0 commit comments

Comments
 (0)