Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
18 changes: 17 additions & 1 deletion docs/customData.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ All top-level properties share two basic properties, `name` and `description`. F
}
```

You can also specify 4 additional properties for them:
You can also specify 5 additional properties for them:

```jsonc
{
Expand All @@ -73,6 +73,11 @@ You can also specify 4 additional properties for them:
"IE10",
"O37"
],
"baseline": {
"status": "high",
"baseline_low_date": "2015-09-30",
"baseline_high_date": "2018-03-30"
},
"status": "standard",
"references": [
{
Expand All @@ -91,14 +96,25 @@ You can also specify 4 additional properties for them:
export let browserNames = {
E: 'Edge',
FF: 'Firefox',
FFA: 'Firefox on Android',
S: 'Safari',
SM: 'Safari on iOS',
C: 'Chrome',
CA: 'Chrome on Android',
IE: 'IE',
O: 'Opera'
};
```
The browser compatibility will be rendered at completion and hover. Items that is supported in only one browser are dropped from completion.

- `baseline`: An object containing [Baseline](https://web-platform-dx.github.io/web-features/) information about the feature's browser compatibility, as defined by the [WebDX Community Group](https://web-platform-dx.github.io/web-features/webdx-cg/).

- `status`: The Baseline status is either `"false"` (limited availability across major browsers), `"low"` (newly available across major browsers), or `"high"` (widely available across major browsers).

- `baseline_low_date`: A date in the format `YYYY-MM-DD` representing when the feature became newly available, or undefined if it hasn't yet reached that status.

- `baseline_high_date`: A date in the format `YYYY-MM-DD` representing when the feature became widely available, or undefined if it hasn't yet reached that status. The widely available date is always 30 months after the newly available date.

- `status`: The status of the item. The format is:
```
export type EntryStatus = 'standard' | 'experimental' | 'nonstandard' | 'obsolete';
Expand Down
27 changes: 25 additions & 2 deletions docs/customData.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,31 @@
"description": "Supported browsers",
"items": {
"type": "string",
"pattern": "(E|FF|S|C|IE|O)([\\d|\\.]+)?",
"patternErrorMessage": "Browser item must follow the format of `${browser}${version}`. `browser` is one of:\n- E: Edge\n- FF: Firefox\n- S: Safari\n- C: Chrome\n- IE: Internet Explorer\n- O: Opera"
"pattern": "(E|FFA|FF|SM|S|CA|C|IE|O)([\\d|\\.]+)?",
"patternErrorMessage": "Browser item must follow the format of `${browser}${version}`. `browser` is one of:\n- E: Edge\n- FF: Firefox\n- FM: Firefox Android\n- S: Safari\n- SM: Safari on iOS\n- C: Chrome\n- CM: Chrome on Android\n- IE: Internet Explorer\n- O: Opera"
}
},
"baseline": {
"type": "object",
"description": "Baseline information for the feature",
"properties": {
"status": {
"type": "string",
"description": "Baseline status",
"enum": ["high", "low", "false"]
},
"baseline_low_date": {
"type": "string",
"description": "Date when the feature became newly supported in all major browsers",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"patternErrorMessage": "Date must be in the format of `YYYY-MM-DD`"
},
"baseline_high_date": {
"type": "string",
"description": "Date when the feature became widely supported in all major browsers",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"patternErrorMessage": "Date must be in the format of `YYYY-MM-DD`"
}
}
},
"references": {
Expand Down
2 changes: 1 addition & 1 deletion src/cssLanguageTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,4 +327,4 @@ export interface CSSFormatConfiguration {
/** @deprecated Use newlineBetweenSelectors instead*/
selectorSeparatorNewline?: boolean;

}
}
34 changes: 17 additions & 17 deletions src/data/webCustomData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ export const cssData : CSSDataV1 = {
}
],
"syntax": "auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>",
"relevance": 74,
"relevance": 75,
"references": [
{
"name": "MDN Reference",
Expand Down Expand Up @@ -725,7 +725,7 @@ export const cssData : CSSDataV1 = {
}
],
"syntax": "<single-animation-fill-mode>#",
"relevance": 64,
"relevance": 65,
"references": [
{
"name": "MDN Reference",
Expand Down Expand Up @@ -873,7 +873,7 @@ export const cssData : CSSDataV1 = {
"O30"
],
"syntax": "<easing-function>#",
"relevance": 72,
"relevance": 73,
"references": [
{
"name": "MDN Reference",
Expand Down Expand Up @@ -2633,7 +2633,7 @@ export const cssData : CSSDataV1 = {
"O3.5"
],
"syntax": "<line-width> || <line-style> || <color>",
"relevance": 81,
"relevance": 82,
"references": [
{
"name": "MDN Reference",
Expand Down Expand Up @@ -2793,7 +2793,7 @@ export const cssData : CSSDataV1 = {
"O9.2"
],
"syntax": "<line-width> || <line-style> || <color>",
"relevance": 80,
"relevance": 81,
"references": [
{
"name": "MDN Reference",
Expand Down Expand Up @@ -3081,7 +3081,7 @@ export const cssData : CSSDataV1 = {
"O10.5"
],
"syntax": "<length-percentage>{1,2}",
"relevance": 76,
"relevance": 75,
"references": [
{
"name": "MDN Reference",
Expand Down Expand Up @@ -3177,7 +3177,7 @@ export const cssData : CSSDataV1 = {
],
"values": [],
"syntax": "<line-width>{1,4}",
"relevance": 82,
"relevance": 83,
"references": [
{
"name": "MDN Reference",
Expand Down Expand Up @@ -3215,7 +3215,7 @@ export const cssData : CSSDataV1 = {
}
],
"syntax": "<length> | <percentage> | auto",
"relevance": 90,
"relevance": 91,
"references": [
{
"name": "MDN Reference",
Expand Down Expand Up @@ -3336,7 +3336,7 @@ export const cssData : CSSDataV1 = {
}
],
"syntax": "content-box | border-box",
"relevance": 92,
"relevance": 93,
"references": [
{
"name": "MDN Reference",
Expand Down Expand Up @@ -6942,7 +6942,7 @@ export const cssData : CSSDataV1 = {
}
],
"syntax": "<absolute-size> | <relative-size> | <length-percentage>",
"relevance": 94,
"relevance": 95,
"references": [
{
"name": "MDN Reference",
Expand Down Expand Up @@ -8086,7 +8086,7 @@ export const cssData : CSSDataV1 = {
}
],
"syntax": "<grid-line>",
"relevance": 52,
"relevance": 53,
"references": [
{
"name": "MDN Reference",
Expand Down Expand Up @@ -8973,7 +8973,7 @@ export const cssData : CSSDataV1 = {
}
],
"syntax": "<length> | <percentage> | auto",
"relevance": 94,
"relevance": 95,
"references": [
{
"name": "MDN Reference",
Expand Down Expand Up @@ -16287,7 +16287,7 @@ export const cssData : CSSDataV1 = {
}
],
"syntax": "none | <length>",
"relevance": 54,
"relevance": 55,
"references": [
{
"name": "MDN Reference",
Expand Down Expand Up @@ -17633,7 +17633,7 @@ export const cssData : CSSDataV1 = {
"O67"
],
"syntax": "<number>",
"relevance": 53,
"relevance": 54,
"references": [
{
"name": "MDN Reference",
Expand Down Expand Up @@ -22216,7 +22216,7 @@ export const cssData : CSSDataV1 = {
}
],
"syntax": "normal | break-word",
"relevance": 77,
"relevance": 78,
"description": "Specifies whether the UA may break within a word to prevent overflow when an otherwise-unbreakable string is too long to fit.",
"restrictions": [
"enum"
Expand Down Expand Up @@ -24756,7 +24756,7 @@ export const cssData : CSSDataV1 = {
{
"name": "inset-inline-end",
"syntax": "<'top'>",
"relevance": 54,
"relevance": 55,
"browsers": [
"E87",
"FF63",
Expand Down Expand Up @@ -31860,4 +31860,4 @@ export const cssData : CSSDataV1 = {
"description": "The ::view-transition-old CSS pseudo-element represents the \"old\" view state of a view transition — a static snapshot of the old view, before the transition."
}
]
};
};
Loading