Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

Commit

Permalink
Fixed typos, added compilation result.
Browse files Browse the repository at this point in the history
  • Loading branch information
meri committed Jun 20, 2013
1 parent 2e0da6e commit ad9ffe2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions templates/pages/doc.md
Expand Up @@ -245,7 +245,7 @@ Furthermore:
}

## Return Values
Variables defined inside mixins act as return values and are usable in caller. Returned variables never rewrite callers local variables. Only variables not present in callers local scope are going to be copied there.
Variables defined inside mixins act as return values and are usable in caller. Returned variables never rewrite callers local variables. Only variables not present in callers local scope are going to be copied.

Variable defined in mixin acts as return value:

Expand All @@ -270,7 +270,7 @@ Compiles into:
}

## Unlocking Mixins
Mixin defined in mixin acts as return value and is usable in caller too. There is no scope protection, mixins are unlocked even if the local scope contains a mixin with the same name.
Mixins defined in mixin are also usable in caller. There is no scope protection, mixins are unlocked even if the local scope contains mixin with the same name.

.unlock(@value) { // outer mixin
.doSomething() { // nested mixin
Expand All @@ -283,9 +283,13 @@ Mixin defined in mixin acts as return value and is usable in caller too. There i
.doSomething(); //nested mixin was copied here and is usable
}

Compiles into:

.selector {
declaration: 5;
}

Unlocked mixins act only after they have been unlocked. They can not be used before being unlocked. Following would throw syntax error:
Unlocked mixins are available only after they have been unlocked. They can not be used before being unlocked. Following would throw syntax error:

.doSomething(); // syntax error: nested mixin is not available yet
.unlock(5); // too late
Expand Down

0 comments on commit ad9ffe2

Please sign in to comment.