1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

[Sass] Some examples for the @warn directive.

This commit is contained in:
Chris Eppstein 2010-04-10 22:42:18 -07:00
parent 91480eab1c
commit dcaa55fd85

View file

@ -924,6 +924,33 @@ between `@warn` and `@debug`:
so that the user being warned can see where they are calling from so that the user being warned can see where they are calling from
their code. their code.
Usage Example:
@mixin adjust-location($x, $y) {
@if unitless($x) {
@warn "Assuming #{$x} to be in pixels";
$x: 1px * $x;
}
@if unitless($y) {
@warn "Assuming #{$y} to be in pixels";
$y: 1px * $y;
}
position: relative; left: $x; top: $y;
}
Indented Syntax Example:
=adjust-location($x, $y)
@if unitless($x)
@warn "Assuming #{$x} to be in pixels"
$x: 1px * $x
@if unitless($y)
@warn "Assuming #{$y} to be in pixels"
$y: 1px * $y
position: relative
left: $x
top: $y
## Control Directives ## Control Directives
SassScript supports basic control directives SassScript supports basic control directives