Skip to content

Commit

Permalink
Revert "Calc functions breaking change page (sass#798)"
Browse files Browse the repository at this point in the history
This reverts commit 1e9c3a6.
  • Loading branch information
Israel-4Ever committed Aug 17, 2023
1 parent f5707b1 commit ea5b958
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 138 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.

0 comments on commit ea5b958

Please sign in to comment.