Skip to content

Add basic media query auto complete support #443

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

Merged
merged 8 commits into from
Jun 2, 2025
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
39 changes: 39 additions & 0 deletions docs/customData.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,38 @@
"description": "Description shown in completion and hover"
}
}
},
"descriptor": {
"type": "object",
"required": ["name"],
"properties": {
"name": {
"type": "string",
"description": "The name of the descriptor."
},
"description": {
"description": "Description of at descriptor shown in completion and hover",
"anyOf": [
{
"type": "string"
},
{ "$ref": "#/definitions/markupDescription" }
]
},
"status": {
"$ref": "#/properties/properties/items/properties/status"
},
"browsers": {
"$ref": "#/properties/properties/items/properties/browsers"
},
"references": {
"type": "array",
"description": "A list of references for the descriptor shown in completion and hover",
"items": {
"$ref": "#/definitions/references"
}
}
}
}
},
"properties": {
Expand Down Expand Up @@ -168,6 +200,13 @@
"items": {
"$ref": "#/definitions/references"
}
},
"descriptors": {
"type": "array",
"description": "A list of descriptors for the at-directive, for example prefers-reduced-motion for @media",
"items": {
"$ref": "#/definitions/descriptor"
}
}
}
}
Expand Down
12 changes: 12 additions & 0 deletions src/cssLanguageTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,25 @@ export interface IPropertyData {
relevance?: number;
atRule?: string;
}
export interface IDescriptorData {
name: string,
description?: string,
references?: IReference[],
syntax?: string,
type?: string,
values?: IValueData[]
browsers?: string[];
baseline?: BaselineStatus;
status?: EntryStatus;
}
export interface IAtDirectiveData {
name: string;
description?: string | MarkupContent;
browsers?: string[];
baseline?: BaselineStatus;
status?: EntryStatus;
references?: IReference[];
descriptors?: IDescriptorData[];
}
export interface IPseudoClassData {
name: string;
Expand Down
Loading