Skip to content

Scope and the order of declarations/definitions. #110

Closed
@seven-phases-max

Description

@seven-phases-max

(I linked to the "Scope" section from 1868, read it and...)
It states:

Note that the order of declaration does matter.

This is misleading. The order of declarations does not matter actually . E.g. the following two examples are equal:
(A):

@var: red;

#page {
  @var: white;
  #header {
    color: @var; // white
  }
}

(B):

@var: red;

#page {
  #header {
    color: @var; // white
  }
  @var: white;
}

Not counting a few language dark corner cases and issues similar to those mentioned in 1399 where the order of definition is indeed important (usually just involving some recursive (re)definitions and cycling dependencies)).


I decided to create this ticket first just in case someone has any/other ideas for improving/rewording this docs section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions