The files here provide examples of the variable and property accessor syntax currently being discussed at less.js#1848.
@{ #ns > var }
${ prop }
${ #ns > prop }
- Enable accessing namespaced variables with
@{#ns var}
(see accessor.initial.less, #1848). - Enable accessing local and namespaced properties with,
$prop
,${prop}
and${#ns prop}
(see #2433, #76, #6). - In the next major version, enable syntax sugar
#ns@var
, and#ns$prop
, allowed where plain variables (e.g.@var
) are allowed.
- accessor.initial.less Summarizes the minimum feature, enabling accessing namespaced variables. Safe for immediate implementation.
- accessor.summary.less The full proposed feature, including accessing namespaced variables as well as local and namespaced properties, and some syntax sugar.
What if we allowed the interpolation form to return a reference to just the namespace?
Only thing is, this would serve this feature, but if you wanted to reference a selector for some other feature, element names vs. vars or props would be ambiguous. Unless we require explicit referencing within the interpolated form. e.g.
Of course, that makes it a bit redundant. OR maybe a different form to point to just the namespace?