Hi CCworker,
I was looking into this recently, and in short it’s not that straight forward to ignore a load of CSS or a whole CSS file(s), especially when working with WordPress as the theme is loaded straight from the style.css file meaning that this isn’t even queued by php ( which would give you the opportunity to selectively load it )
Using another page template is a method that can help load additional CSS specific to that page, but not necessarily ignore other CSS, but actually would be overkill in my opinion anyway.
Couple of ideas you can try ( though without seeing your site or your “WebView” app, I can only really be quite generic ):
1. Deregister and Dequeue css files that you don’t want
– Check out this thread on stack overflow – shows how to use a couple of functions to remove style sheets, requires you to know the handles of the sheets you want to remove and set the priority of the add_action statement correctly ( i.e. after those styles are loaded )
– NB. I’m yet to successfully remove a theme’s base style.css by this method
– You’d need to either create a new page template by copying page.php and renaming it, if your theme has one, or add this code to you functions.php inside some sort of condition e.g.
( get_the_id() === $page_id ) ? //dequeue scripts : //don't dequeue scripts;
2. Create / load / use specific CSS for the elements in your app that override your theme’s CSS
– Could take a little while to override all of the theme’s CSS that you need to, but having specific CSS for specific elements in your app ( i.e. using IDs and Classes ) will mean you keep control over it and haven’t messed with other styles you might want to keep, e.g. for your header and menu
3. Move the app out of WordPress
– If your app doesn’t actually need to be inside WordPress, you could move it to a standalone file / set of files and link directly to that, therefore bypassing all of your sites normal styling
Hope this helps,