jsapi-resources
jsapi-resources copied to clipboard
How to only use base styles instead of whole theme from 4.29+?
IMPORTANT
- [X] My question is related to the samples and content within this repository. For all other issues, open a ticket with Esri Technical Support or post your question in the community forum.
- [X] I have checked for existing issues to avoid duplicates. If someone has already opened an issue for what you are experiencing, please add a 👍 reaction and comment as necessary to the existing issue instead of creating a new one. You can also refer to this repo's troubleshooting guide for hints and suggestions.
Actual behavior
In 4.29 if you only import the base css (@arcgis/core/assets/esri/themes/base/_View.scss
) you will receive an error:
Undefined variable: font-family: $font-family;
This worked until and including 4.28.
Expected behavior
In 4.28 we were able to use the base styles (@arcgis/core/assets/esri/themes/base/_View.scss
) instead of the whole theme (@arcgis/core/assets/esri/themes/light/main.css
) which improved our bundle size massively. Our app is very simple and we don't need most of the widgets.
This would work if _View.scss
would use @use
instead of "global" scss imports.
Reproduction sample
See angular.json
, line 36. Stackblitz example
Reproduction steps
open the example, start it and see the error
Reproduction browser
Chrome 123 on macOS (Sonoma)
Operating System
macOS 10.15.7