JuergenGutsch / blog

Personal blog about web development based on .NET and .NET Core
https://asp.net-hacker.rocks/
Other
31 stars 17 forks source link

ASP.​NET Core in .NET 6 - CSS isolation for MVC Views and Razor Pages #168

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

ASP.​NET Core in .NET 6 - CSS isolation for MVC Views and Razor Pages

https://asp.net-hacker.rocks/2021/05/10/aspnetcore6-08-css-isolation.html

safarviktor commented 2 years ago

This does not appear to work in net6. Even on initial render, the elements are missing the unique attributes https://github.com/dotnet/aspnetcore/issues/33446

safarviktor commented 2 years ago

Regarding my comment above, it does work until you enable Razor runtime compilation via AddRazorRuntimeCompilation().

JuergenGutsch commented 2 years ago

Hi @safarviktor Awesome. Thanks. That's good to know. As far as I recognized, it is active by default on every new project

JoeyManCan commented 2 years ago

Is it possible to have this on the .NET framework 4.7.2?

JuergenGutsch commented 2 years ago

Hi @JoeyManCan It is only available in ASP.NET Core.

In .NET Framework, it would need to rewrite the view engine as well as the CSS bundler. Since ASP.NET on .NET Framework is no longer maintained, it won't be added there.

JoeyManCan commented 2 years ago

If I do that, could I work with it on the 4.7.2 version?

On Wed., Feb. 9, 2022, 3:02 a.m. Juergen Gutsch, @.***> wrote:

Hi @JoeyManCan https://github.com/JoeyManCan It is only available in ASP.NET Core.

In .NET Framework, it would need to rewrite the view engine as well as the CSS bundler. Since ASP.NET on .NET Framework is no longer maintained, it won't be added there.

— Reply to this email directly, view it on GitHub https://github.com/JuergenGutsch/blog/issues/168#issuecomment-1033637814, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYFWPIFFWH6TIGKHKVECO3U2JCWDANCNFSM5JRPMQTA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

JuergenGutsch commented 2 years ago

Of course, if you would rewrite the view engine you could do that :-)