Content pages in a SPA not showing CSS styles

Hi

I have created a SPA and split a region out to a content page. When I go to edit the content page it does not show the styles created in the main css file.

The content file

Even if I say attach it still doesn’t show the styling

1 Like

The only way I can see the applied styles is if I drop in the following code on the content page:

<script>
	if (!$("link[href='/css/style.css']").length)
$('<link href="/css/style.css" rel="stylesheet">').appendTo("head");
</script>

Every time I select a new item I have to reattach the style, make changes and reload the page.

1 Like

I’ve never seen the design tab show existing styles, though it was only good for adding a style. Would be neat to be able to see and edit style in that tab instead of code.

@Ray thanks for posting this I thought I was going crazy!

Just want to add that i am experiencing the same issue since th latest upgrade.

My standard custom CSS file is not showing any if its changes in the design view for any of my VIEWS (node JS project)

If i load the page in the browser it works fine.

If i look at the main layout page in the design view it works fine. It is just the View pages in Design View that don’t have any custom CSS.

Naturally, if i link the CSS file at the top of the VIEW page then it loads. So its just an issue with it not loading in the ‘includes’ i guess?

Hey @Philip_J have you tested in a new project since the upgrade. May not be practical, but I found that creating a new project it seems to work ok so maybe it’s a backwards project compatibility issue - not making the required updates to older projects. Just a thought.

No, haven’t tested that. And your’e right, not practical :slight_smile: It is assigned to Patrick so hopefully will get fixed. Just added in the link to the css file for now and it works

1 Like

I tried on a new project both PHP and Node-based and it doesn’t work. I still have to add my custom code snippet to include the style sheet.

1 Like

This will be fixed in tomorrow’s update, both for PHP and NodeJS.

Fixed in Wappler 3.3.2

This topic was automatically closed after 31 hours. New replies are no longer allowed.