2 // --------------------------
4 // fa-content: convenience function used to set content property
5 @function fa-content($fa-var) {
6 @return unquote("\"#{ $fa-var }\"");
9 // fa-divide: Originally obtained from the Bootstrap https://github.com/twbs/bootstrap
11 // Licensed under: The MIT License (MIT)
13 // Copyright (c) 2011-2021 Twitter, Inc.
14 // Copyright (c) 2011-2021 The Bootstrap Authors
16 // Permission is hereby granted, free of charge, to any person obtaining a copy
17 // of this software and associated documentation files (the "Software"), to deal
18 // in the Software without restriction, including without limitation the rights
19 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
20 // copies of the Software, and to permit persons to whom the Software is
21 // furnished to do so, subject to the following conditions:
23 // The above copyright notice and this permission notice shall be included in
24 // all copies or substantial portions of the Software.
26 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
34 @function fa-divide($dividend, $divisor, $precision: 10) {
35 $sign: if($dividend > 0 and $divisor > 0, 1, -1);
36 $dividend: abs($dividend);
37 $divisor: abs($divisor);
39 $remainder: $dividend;
44 @error "Cannot divide by 0";
49 @while $remainder >= $divisor {
50 $quotient: $quotient + 1;
51 $remainder: $remainder - $divisor;
53 @if $remainder > 0 and $precision > 0 {
54 $remainder: fa-divide($remainder * 10, $divisor, $precision - 1) * .1;
56 @return ($quotient + $remainder) * $sign;