diff --git a/fixtures/e2e/_variables.scss b/fixtures/e2e/_variables.scss index 2ecf66b4..ce99fc17 100644 --- a/fixtures/e2e/_variables.scss +++ b/fixtures/e2e/_variables.scss @@ -1 +1,2 @@ $variable: 'value'; +$variable2: min-width 1200px; diff --git a/fixtures/e2e/definition/main.scss b/fixtures/e2e/definition/main.scss index 8516f4da..adc8d693 100644 --- a/fixtures/e2e/definition/main.scss +++ b/fixtures/e2e/definition/main.scss @@ -2,4 +2,6 @@ content: $variable + function(); @include mixin(); + + @media ($variable2) {}; } diff --git a/src/unsafe/test/e2e/suite/definition/definitions.test.ts b/src/unsafe/test/e2e/suite/definition/definitions.test.ts index 1cdec099..82ac410d 100644 --- a/src/unsafe/test/e2e/suite/definition/definitions.test.ts +++ b/src/unsafe/test/e2e/suite/definition/definitions.test.ts @@ -18,6 +18,12 @@ describe('SCSS Definition Test', () => { await testDefinition(docUri, position(2, 13), expectedLocation); }); + it('should find definition for variables in media', async () => { + const expectedDocumentUri = getDocUri('_variables.scss'); + const expectedLocation = sameLineLocation(expectedDocumentUri, 2, 1, 11); + await testDefinition(docUri, position(6, 12), expectedLocation); + }); + it('should find definition for functions', async () => { const expectedDocumentUri = getDocUri('_functions.scss'); const expectedLocation = sameLineLocation(expectedDocumentUri, 1, 1, 9); diff --git a/src/unsafe/types/nodes.ts b/src/unsafe/types/nodes.ts index 8be2ab48..c530bdcc 100644 --- a/src/unsafe/types/nodes.ts +++ b/src/unsafe/types/nodes.ts @@ -49,7 +49,8 @@ export enum NodeType { For, Each, While, - MixinContent, + MixinContentReference, + MixinContentDeclaration, Media, Keyframe, FontFace, @@ -67,7 +68,18 @@ export enum NodeType { AtApplyRule, CustomPropertyDeclaration, CustomPropertySet, - ListEntry + ListEntry, + Supports, + SupportsCondition, + NamespacePrefix, + GridLine, + Plugin, + UnknownAtRule, + Use, + ModuleConfiguration, + Forward, + ForwardVisibility, + Module } export interface INode {