Hi guys,
I'm exploring the options of customizing the look of an app that uses Radzen Blazor components. I searched around the forum and from what I see, besides using a premium Theme editor, easiest option is to make changes to Radzen project, build it and copy produced css.
What I'm currently thinking even easier option would be, is if those SCSS files from Radzen project, would be included in the end package (like the produced css files are), so we can access them inside our project. This would allow us to create our scss file, include Radzen one and then apply all the "overrides" and additional styles we want/need. This way, it avoids the need to always build Radzen project, and keeps everything inside the project we work on.
What do you think about this, and would you be able to include them in the end package?
Side note:
I'll acquire your premium version in the following months, as I really like your material 3 theme and want to support you (we discussed this over the email recently), but my concern with premium Theme Editor is that I'm required to use Radzen Studio for those modifications. As I'm using exclusively JetBrains rider for all the .net work, I'm trying to not have to fire up another tool, just to make the style changes. Correct my if I'm misinformed on this one and there is an option of doing it outside the Radzen Studio.
I am not sure if including the sass files in the nuget package would even work.
The package itself is a ZIP file and all files are embedded in it. The embedded assets are served by the ASP.NET pipeline during development. As a result any embedded file isn't available during build-time (when SASS is processed). The recommended approach is to either modify an existing sass file (after cloning the repository) or create a new one by copying an existing theme.
Theme modifications are only available via Radzen Blazor Studio. You need to use it only when doing the modifications which I presume won't be that often.
@korchev Thank you for quick reply and clarification as I was not aware of how it works internally with that _content path. But I could not sit in peace without doing some experimentation, at least to learn something new
I kind of made it work, but it's not perfect, as I'm trying to figure out if I can somehow use dynamic path for the ".nuget" folder.
I added a test.scss file inside the .nuget package folder
Then in the compilerconfig.json file (of AspNetCore.SassCompiler library), I added "IncludePaths" value, to point to that scss folder of nuget package.
And finally, I just called @use 'test.scss' in my site.scss file.
Which picks up that scss file from package and includes class defined in it.
What do you think about this? I know it sounds crazy, but I wanted to experiment a bit and see if I can come up with a solution as it interested me a lot for some reason