© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
5 replies
Keeda

❔ How can I import json file inside a sass file?

I have looked around in the web for various solutions and found it could be done easily in javascript with a node package called node-sass and sass-json-importer something like that. But none of that solution works according to my requirement.
What I am looking for is a nuget package which can help my life easier?
I came across this nuget package called LibSassHost it can compile sass files with imported json into css files but whenever I compile them via code it through exception regarding the wrong sass format.
There is another extension webcompiler in VS2022 can I use this to achieve the same but from my knowledge it doesn't allows json imported statements at the top.

Basically What I want to do is get some variables like hosturl etc from some json file and then be able to import that json file inside a sass file so I can use the urls in various classes? Does this makes any sense?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Opening a Json file
C#CC# / help
12mo ago
❔ How can I read data from file called lang.json
C#CC# / help
3y ago
✅ How can I hide buttons inside a tablelayout?
C#CC# / help
4y ago
❔ How can I dock a form inside of a TabPage?
C#CC# / help
4y ago