MaterialThemeGenerator icon indicating copy to clipboard operation
MaterialThemeGenerator copied to clipboard

generated css is hardcoded to compile with version 11

Open l-silvestre opened this issue 2 years ago • 5 comments

based on the following snippet:

this.service.compileScssTheme(RenderService.getTemplate({ ...theme, version: 11 })).then(text => {

the generated css will always use scss from angular version 11. When trying to change to version 13 it breaks because of the changes to the usage of scss functions from the "@use '@angular/material' as mat;". Is there any solution for this to be able to generate css with angular 13?

l-silvestre avatar May 18 '22 13:05 l-silvestre

That should only be for the code that is displayed in the previewer due to limitations of the compilation process. The generated CSS/SCSS should vary when you select the different version at the top. You can verify this by viewing source and selecting 13 vs 11.

On Wed, May 18, 2022 at 9:57 AM l-silvestre @.***> wrote:

based on the following snippet:

this.service.compileScssTheme(RenderService.getTemplate({ ...theme, version: 11 })).then(text => {

the generated css will always use scss from angular version 11. When trying to change to version 13 it breaks because of the changes to the usage of scss functions from the @.*** https://github.com/use @.***/material' as mat;". Is there any solution for this to be able to generate css with angular 13?

— Reply to this email directly, view it on GitHub https://github.com/arciisine/MaterialThemeGenerator/issues/53, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJUUL7APFLVNXOS67V6YBDVKTZNFANCNFSM5WISKP4Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>

arciisine avatar May 18 '22 14:05 arciisine

Thanks for the fast reply. I know the generate scss does vary based on the selected version. My current issue is that the when trying to compile the angular version 13 sass it is not working. I understand this is a limitation of the compiler as it does not support @use rules right now. The reason im bringing this up is because i need a similiar thing in my current project and i was hoping i might discover something from this.

l-silvestre avatar May 18 '22 15:05 l-silvestre

I'm currently using the v13 scss in a few projects. I'll take a look, but if you have specific error messages that could also be helpful.

On Wed, May 18, 2022, 11:15 AM l-silvestre @.***> wrote:

Thanks for the fast reply. I know the generate scss does vary based on the selected version. My current issue is that the when trying to compile the angular version 13 sass it is not working. I understand this is a limitation of the compiler as it does not support @use https://github.com/use rules right now. The reason im bringing this up is because i need a similiar thing in my current project and i was hoping i might discover something from this.

— Reply to this email directly, view it on GitHub https://github.com/arciisine/MaterialThemeGenerator/issues/53#issuecomment-1130149622, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJUUL4ZDD4OZ6LG4A2WE2TVKUCQ5ANCNFSM5WISKP4Q . You are receiving this because you commented.Message ID: @.***>

arciisine avatar May 18 '22 16:05 arciisine

Am I correct that currently when choosing Version 13+, there is no way to get the CSS? (as opposed to SCSS).

AFDevMike avatar Jun 13 '23 01:06 AFDevMike

Yes,

The client-side SASS rendering is a complicated process, and there were limitations with what could be handled. Working with multiple versions of the angular framework also made it a bit complicated, when compiling in the browser.

On Mon, Jun 12, 2023 at 9:21 PM Michael S @.***> wrote:

Am I correct that currently when choosing Version 13+, there is no way to get the CSS? (as opposed to SCSS).

— Reply to this email directly, view it on GitHub https://github.com/arciisine/MaterialThemeGenerator/issues/53#issuecomment-1588359824, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJUULZJ2SJFWUZDE75CV53XK66APANCNFSM5WISKP4Q . You are receiving this because you commented.Message ID: @.***>

arciisine avatar Jun 13 '23 13:06 arciisine