blog icon indicating copy to clipboard operation
blog copied to clipboard

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

Open utterances-bot opened this issue 3 years ago • 7 comments

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

utterances-bot avatar Dec 07 '21 15:12 utterances-bot

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 avatar Dec 07 '21 15:12 safarviktor

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

safarviktor avatar Dec 08 '21 09:12 safarviktor

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

JuergenGutsch avatar Dec 08 '21 21:12 JuergenGutsch

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

JoeyManCan avatar Feb 09 '22 00:02 JoeyManCan

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.

JuergenGutsch avatar Feb 09 '22 11:02 JuergenGutsch

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: @.***>

JoeyManCan avatar Feb 10 '22 02:02 JoeyManCan

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

JuergenGutsch avatar Feb 14 '22 07:02 JuergenGutsch