From ad9ffe2e82d1f92f08886fb0d7da5d91803b383a Mon Sep 17 00:00:00 2001 From: meri Date: Thu, 20 Jun 2013 11:32:16 +0200 Subject: [PATCH] Fixed typos, added compilation result. --- templates/pages/doc.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/templates/pages/doc.md b/templates/pages/doc.md index f0e1cb3..a48ecf7 100644 --- a/templates/pages/doc.md +++ b/templates/pages/doc.md @@ -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: @@ -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 @@ -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