Jump to content

Theme inheritance, custom.css loading order.


Go to solution Solved by Monolith Board Games,

Recommended Posts

Posted

Hello,
I am trying to find out if it is possible to change the order of loading custom.css files as part of a secondary theme (theme inheritance) currently the child theme file is loaded before the parent theme which is not logical , and does not allow overloading.

Do you think it's possible to change this ?

Thanks in advance.

Posted (edited)

First of all, excuse my bad english... so

The site is under modifications, this is not public now.

My example :

I have 2 themes, a primary one (SKIN TO V3) , and a child theme _SKIN CAPITAINE VAUDOU (colors modifications et sommes other changes)

Could contain: Text

For the first theme, I have this files, i'ts OK for me

Could contain: Mobile Phone, Phone, Electronics, Text

For the child theme, all files other than the customs.css are inherited from the main theme, only the custom.css is modified.

Could contain: Mobile Phone, Phone, Electronics, Text

I made some changes in the custom.css file of the child theme, and I see when the site engine loads the CSS, that it concatenates the result by first loading the custom.css of the child theme, and then the custom.css of the parent theme.

In fact, in this case, I'm not be able du overwrite rules in my child theme.

 

Edited by Monolith Board Games
Posted

It would need to be in a location whereby we can actively see this happening, and the example rules it is happening with. If you can replicate this with a simple example, on a fresh install with default themes other than the simple example set, we can certainly then get a bug report in for it.

Posted

Hello, this is the test URL.

You will find several skins below.
SKIN TO V3 is the main one, the others are child skins of this one.

When I use the _SKIN Conan for example, I see the custom.css used integrates the rules of the custom.css of the Conan skin before the custom.css of the main skin. In this case i'm not be able to change rules in the child skin. 

Do you see what I mean?

 

This part of code it's from custom.css Conan File and it's added before the main code

Quote

@import url('https://fonts.googleapis.com/css2?family=Marcellus&family=Marcellus+SC&family=Palanquin+Dark:wght@400;700&display=swap');#ipsLayout_header header {
    background: #0b0706 url("https://the-overlord.com/Images/header-skin-conan-v2.jpg") center no-repeat;
}

:root {
    --to-primary-color: #bf755a;
    --to-primary-color-hover: #d38467;
    --theme-item_status: 191,117,90;
}

.ipsPager_prev a {
    color: #bf755a !important;
}

.ipsPager_prev a:hover {
    color: #d38467 !important;
}

 

Posted

We would need a very basic CSS example you have set on a default unaltered theme. I am unable to replicate any problems on the latest version of the platform. For example I set the following

body 
{background-color: red;}

Created a child theme, and changed red to black. This correctly sets black on the child theme.

 

Posted

Ok .... it's works with simples rules 😞

The changes I want to make are to redefine some variables like:

:root {
      --to-primary-color: #bf755a;
      --to-primary-color-hover: #d38467;
      --theme-item_status: 191,117,90;
} 

Can you confirm that the operation is that in the case of a child theme, the custom.css of the parent is ignored?

Posted

Yes that is correct. However with CSS you should be adding to custom.css, not modifying files directly. Could I confirm that is what you are doing?

Posted
12 minutes ago, Monolith Board Games said:

Hello marc, I would have liked to edit one of my posts, but I see that I can't.

Correct. You are limited in time to edit. Could you please clarify what you want to edit? You're welcome to quote it and reply with what you wish to add on.

Posted
4 minutes ago, Monolith Board Games said:

I would like to remove the test link

I have done this for you now. Please let us know if we can be of further assistance.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...