Skip to content

variables in import paths only work if defined in same file #1846

@ESchuderer

Description

@ESchuderer

LESS v 1.6.2

Test Case

variables.less

@theme: 'default';

buttons.less

@import 'variables.less';

some button related less code

@import 'themes/@{theme}/buttons.less';
Error
variable @theme is undefined
Workaround

If I define the @theme variable directly within the buttons.less file it works fine, but if I do in the imported variables.less it wont work. Any other variables outside of that @import section work fine, eg. padding: @size-xs @size-s;.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions