Hello,
We recently purchased ASP.NET Zero and started working on our installation.
I looked into adding a custom Metronic theme and I successfully added a new colour (using MetronicThemeChanger) to the pallette of the Default theme, including the custom theme folders with metronic-customize, etc.
However, I noticed that assets/common/styles/themes/mytheme/metronic-customize.css
is used and that assets/common/styles/themes/mytheme/metronic-customize.less
is not compiled/built to the .css
variant. So when I make changes to the .less
file, the changes are not reflected in the .css
file.
I saw that DynamicResourcesHelper.ts
includes the PrimeNG CSS and the above mentioned metronic-customize.css
, but how can I change this to include/use the .less
variant without changing core code? Changing it in DynamicResourcesHelper.ts
would mean that I can't upgrade without losing this modification. I can't edit AppPreBootstrap
, which seems to load in the DynamicResourcesHelper
, as that is basically core code as well.
I also tried adding the .less
file in angular.json
(tried it both before styles.css
and after it), but the changes in the .less
file are still overridden by the .css
one.
And I also tried using @import
for that file in src/styles.css
, which doesn't seem to work either.
Any tips on how to approach this would be appreciated. :)
2 Answer(s)
-
1
Hi @sbj
We will work on this issue in https://github.com/aspnetzero/aspnet-zero-core/issues/2276.
As a temporary solution, if you are working on Windows, you can use WebCompiler extension to bundle for less files.
-
0
Hello @ismcagdas,
I'll use the workaround in the meantime, whilst waiting for the new release.
Thanks for the help and quick reply! :)