Skip to content

Commit

Permalink
Merge pull request #804 from sass/revert-calc
Browse files Browse the repository at this point in the history
Revert documentation of the new calculation functions
  • Loading branch information
nex3 authored Aug 17, 2023
2 parents b111f18 + 6d83729 commit 820881b
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 342 deletions.
1 change: 0 additions & 1 deletion source/_data/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ toc:
- Duplicate Variable Flags: /documentation/breaking-changes/duplicate-var-flags/
- Default Exports: /documentation/breaking-changes/default-export/
- abs() Percentage: /documentation/breaking-changes/abs-percent/
- Calc Functions: /documentation/breaking-changes/calc-functions/
- Command Line: /documentation/cli/
:children:
- Dart Sass: /documentation/cli/dart-sass/
Expand Down
28 changes: 14 additions & 14 deletions source/documentation/at-rules/function.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,30 @@ Functions are called using the normal CSS function syntax.
[`@return` at-rule]: #return

{% codeExample 'functions' %}
@function fibonacci($n) {
$sequence: 0 1;
@for $_ from 1 through $n {
$new: nth($sequence, length($sequence)) + nth($sequence, length($sequence) - 1);
$sequence: append($sequence, $new);
@function pow($base, $exponent) {
$result: 1;
@for $_ from 1 through $exponent {
$result: $result * $base;
}
@return nth($sequence, length($sequence));
@return $result;
}

.sidebar {
float: left;
margin-left: fibonacci(4) * 1px;
margin-left: pow(4, 3) * 1px;
}
===
@function fibonacci($n)
$sequence: 0 1
@for $_ from 1 through $n
$new: nth($sequence, length($sequence)) + nth($sequence, length($sequence) - 1)
$sequence: append($sequence, $new)
@return nth($sequence, length($sequence))
@function pow($base, $exponent)
$result: 1
@for $_ from 1 through $exponent
$result: $result * $base

@return $result


.sidebar
float: left
margin-left: fibonacci(4) * 1px
margin-left: pow(4, 3) * 1px
{% endcodeExample %}

{% funFact %}
Expand Down
123 changes: 0 additions & 123 deletions source/documentation/breaking-changes/calc-functions.md

This file was deleted.

Loading

0 comments on commit 820881b

Please sign in to comment.