-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed / in scss and replaced with math.div() to support /'s depreca…
…tion in Dart SASS 2.0
- Loading branch information
Showing
7 changed files
with
17 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
* Breakpoints for JavaScript (ES6). Works with the Deloitte Digital SCSS @bp mixin and Less .bp mixin | ||
* | ||
* @namespace DDBreakpoints | ||
* @version 2.0.3 | ||
* @copyright 2012-2020 Deloitte Digital Australia - http://www.deloittedigital.com/au | ||
* @version 2.0.4 | ||
* @copyright 2012-2021 Deloitte Digital Australia - http://www.deloittedigital.com/au | ||
* @author Deloitte Digital Australia [email protected] | ||
* @license BSD 3-Clause (http://opensource.org/licenses/BSD-3-Clause) | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,8 @@ | |
* | ||
* @namespace bp | ||
* @memberof DD | ||
* @version 2.0.3 | ||
* @copyright 2012-2020 Deloitte Digital Australia - http://www.deloittedigital.com/au | ||
* @version 2.0.4 | ||
* @copyright 2012-2021 Deloitte Digital Australia - http://www.deloittedigital.com/au | ||
* @author Deloitte Digital Australia [email protected] | ||
* @license BSD 3-Clause (http://opensource.org/licenses/BSD-3-Clause) | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/** | ||
* Breakpoints for Less. Works with the Deloitte Digital DD.bp JavaScript | ||
* | ||
* @version 2.0.3 | ||
* @copyright 2012-2020 Deloitte Digital Australia - http://www.deloittedigital.com/au | ||
* @version 2.0.4 | ||
* @copyright 2012-2021 Deloitte Digital Australia - http://www.deloittedigital.com/au | ||
* @author Deloitte Digital Australia [email protected] | ||
* @license BSD 3-Clause (http://opensource.org/licenses/BSD-3-Clause) | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
/** | ||
* Breakpoints for SCSS. Works with the Deloitte Digital DD.bp JavaScript | ||
* | ||
* @version 2.0.3 | ||
* @copyright 2012-2020 Deloitte Digital Australia - http://www.deloittedigital.com/au | ||
* @version 2.0.4 | ||
* @copyright 2012-2021 Deloitte Digital Australia - http://www.deloittedigital.com/au | ||
* @author Deloitte Digital Australia [email protected] | ||
* @license BSD 3-Clause (http://opensource.org/licenses/BSD-3-Clause) | ||
*/ | ||
|
||
@use "sass:map"; | ||
@use "sass:math"; | ||
|
||
// Global variables | ||
$is-responsive: true !default; // toggles if responsive stylesheets are required - used for outputting legacy non-responsive stylesheets using the same code | ||
|
@@ -80,15 +81,15 @@ $_breakpoints-max: _calc-max-bps(); | |
$unit: 1rem; | ||
} | ||
|
||
@return $number / ($number * 0 + 1) * $unit; | ||
@return math.div($number, $number * 0 + 1) * $unit; | ||
} @else { | ||
@error "Expected number but was passed #{type_of($number)}: #{$number}"; | ||
} | ||
} | ||
|
||
// Converts px to ems using the $base-font-size global variable | ||
@function _px-to-ems($px) { | ||
@return $px / $base-font-size; | ||
@return math.div($px, $base-font-size); | ||
} | ||
|
||
// Converts a bp name (e.g. l) to the px variable then to ems | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters