I have an ASP.NET Core 7 MVC application that has CSS isolation turned on. This web app is using DataTables.
My styles are stored in the isolated CSS file /Views/Home/Index.cshtml.css
.
The DataTables data is being loaded via Ajax. The tables rows are not being created with the the isolation attribute because DataTables is not aware of that technology.
I would like to add the isolation attribute when the row is created (via the createdRow
function callback provided by DataTables), but I can not figure out how to obtain the css isolation identifier within the Razor view.
Any help is appreciated. Thanks.