Cannot build library including math.div in SCSS
See original GitHub issueType of Issue
[ x] Bug Report
[ ] Feature Request
Description
I recently started trying to build a library of mine with ng-packagr
. The problem is that my project heavily depends on divisions within my scss files, which as per latest sass recommendation I do with math.div
instead of /
.
Once I try to build my library I get the following error:
Invalid CSS after " @return math": expected expression (e.g. 1px, bold), was "math.div
I suspect this is related to having a sass peer dependency older than 1.33.0
.
How To Reproduce
Add a math.div
in your library SCSS
Expected Behaviour
Library builds normally.
Version Information
$ node_modules/.bin/ng-packagr --version
ng-packagr: 13.2.0
@angular/*: 13.1.2
typescript: 4.5.4
rxjs: 7.5.2
node: 14.18.0
npm: 6.14.15
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Sass math.div function is undefined in angular app, but is ...
The SCSS code with math.div works fine in the library. If I put the SCSS code in projects/my-lib/src/lib/my-lib.
Read more >Breaking Change: Slash as Division - Sass
Users should switch all division to use math.div() instead. 💡 Fun fact: Remember, you can silence deprecation warnings from libraries you don't control!...
Read more >Cant use sass math.div? - support - HUGO
I get this error when compiling bootstrap docs, i used math.div in my code in detriment of standard sass / operator. Error: Error...
Read more >SASS Tutorial (build your own CSS library) #7 - Using Math
Hey Gang, in this SASS tutorial we'll see how to use math to calculate CSS property values.🐱👤 Get the full SASS course now...
Read more >Dart SCSS Compatibility [#3278216] | Drupal.org
The new way of using division will be by importing the "sass:math" library and the code would look like this: $x: math.div(10, 2);...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@angular-devkit/build-ng-packagr:build
is no longer supported. Please use theng-packagr
builder in@angular-devkit/build-angular
.It is also unclear why you only have the
sass
version in@angular-devkit/build-angular
listed when you runnpm ls sass
.This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
This action has been performed automatically by a bot.