Select to view content in your preferred language

How to import esri style into local scss

1375
1
02-16-2022 09:20 AM
Annn
by
New Contributor

In my Angular project, I need to import the ESRI stylesheet as part of my scss style. However, I tried to import the follow all failing. All examples I can find import the remote version from esri server. What is the proper way to import ESRI css or scss style?

I tried:

@import 'node_modules/@arcgis/core/assets/esri/css/main';

Importing the scss directly seems to complain about unable to find path to `../themes/light/main.css`

@import 'node_modules/@arcgis/core/assets/esri/css/main.css
@import 'node_modules/@arcgis/core/assets/esri/themes/light/main.css';

 Seem to have trouble finding the .css file even though it is actually found in the path

I even tried to make a copy of the compiled .css into my project and import, but that seemed to have trouble finding path to the font referenced.

 

I'm very confused, please help.

0 Kudos
1 Reply
Annn
by
New Contributor

Figured out the following works.

@import ~@arcgis/core/assets/esri/css/main.css

 

0 Kudos