Global css to link stylesheet global.css

Hi,

I’m not a low code builder, I use global and page css modal into cornerstone builder.
For good performance, at the end of the project, I have to put all my global style in the child theme’s style.css. Because the ‘global css’ style is displayed ‘inline’ in the web page. This is really not practical and today I want to work on the performance of my sites while retaining the flexibility of working with CS.

So, one incredible feature I’d love is this:
< link rel=“stylesheet” href=“ global.css ” type=“text/css” media=“all” >

I mentioned this last year, but it’s still not there.
Do you think it’s possible or will it never come to CS?

Thanks

ps: idem for page css/js and Global JS

Hello @cpennetier,

Thanks for writing in! Have you tried using @import rule in CSS? Kindly check this out:

You can use @import "file/location/folder/global.css" inside the page CSS and global CSS.

Hope this helps.

Hello @ruenel,

I don’t understand your answer.
I want to continue to write my CSS classes in the CSS global/page but have them imported into 1 style sheet on the front end via < link rel=“stylesheet” href=“ global.css ” type=“text/css” media=“all” > and not in inline style with

I’am clearer?

Hi @cpennetier,

What you are trying to do, is that required to add into the Header file after you add the global.css file into the folder. What my colleague is suggesting is that you can add the @import option inside the Page CSS or Global CSS in Cornerstone. It will behave like same.

Thanks

Hi @tristup,

Yes, I’m familiar with how @import works, but when I want to modify CSS classes I have to get out of cornerstone (and go to an IDE, for example, or the WP theme editor). It’s not practical.

It’s impossible for you to compile the Global CSS in CS into a style sheet and generate a < link rel=“stylesheet” href=“ global.css ” type=“text/css” media=“all” > ?

Hi @cpennetier,

Unfortunately, it is not possible to add the link tag to add CSS within the Cornerstone.

Thanks

Sorry but I’m crazy.
Your dev team do not change the code place in the head with :
< style id=“global-styles-inline-css” type=“text/css” > … </ style>

By :
< link rel=“stylesheet” href=“ global.css ” type=“text/css” media=“all” >

In terms of practicality and performance, it would be a real plus.

This is not yet possible, but we’ll forward this thread to our channel for further consideration. Thank you for your understanding.

Thank you for that.
I was told this a few months ago… and I’m sorry but it doesn’t seem like a complicated feature to set up.
:crossed_fingers:t3:

Don’t close this topic, I will come back on it in few month if the feature is not set up.

Hey @cpennetier,

Yes, my colleagues already forward this thread to our development team for further assistance.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.