Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Monolith Board Games Posted December 13, 2022 Posted December 13, 2022 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.
Marc Posted December 13, 2022 Posted December 13, 2022 Please could you let me have an example? I can then take a look on your site, as that sounds to be incorrect
Monolith Board Games Posted December 13, 2022 Author Posted December 13, 2022 (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) For the first theme, I have this files, i'ts OK for me For the child theme, all files other than the customs.css are inherited from the main theme, only the custom.css is modified. 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 December 13, 2022 by Monolith Board Games SeNioR- 1
Marc Posted December 13, 2022 Posted December 13, 2022 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.
Monolith Board Games Posted December 13, 2022 Author Posted December 13, 2022 Thanks Marc, we will create an instance quicky. Have a nice day
Marc Posted December 13, 2022 Posted December 13, 2022 11 minutes ago, Monolith Board Games said: Thanks Marc, we will create an instance quicky. Have a nice day No problem at all 🙂
Monolith Board Games Posted December 14, 2022 Author Posted December 14, 2022 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; }
Marc Posted December 14, 2022 Posted December 14, 2022 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.
Monolith Board Games Posted December 14, 2022 Author Posted December 14, 2022 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?
Solution Monolith Board Games Posted December 14, 2022 Author Solution Posted December 14, 2022 Well, after further testing, I don't think I had misunderstood the principle of inheritance. Files modified in the child skin will be used instead of those in the parent skin, not in addition. You confirm ?
Marc Posted December 14, 2022 Posted December 14, 2022 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?
Monolith Board Games Posted December 14, 2022 Author Posted December 14, 2022 I haven't changed any Invision Community theme files. Just used the custom.css and other personal files to organize our needs.
Marc Posted December 14, 2022 Posted December 14, 2022 In the case of a child theme, the parent theme is not ignored, no. Its just overridden Monolith Board Games 1
Monolith Board Games Posted December 14, 2022 Author Posted December 14, 2022 Thanks Marc, have a nice day from France 🙂
Marc Posted December 14, 2022 Posted December 14, 2022 No problem at all, and have a nice day yourself 🙂 Monolith Board Games 1
Monolith Board Games Posted December 15, 2022 Author Posted December 15, 2022 Hello marc, I would have liked to edit one of my posts, but I see that I can't.
Jim M Posted December 15, 2022 Posted December 15, 2022 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.
Monolith Board Games Posted December 15, 2022 Author Posted December 15, 2022 I would like to remove the test link
Jim M Posted December 15, 2022 Posted December 15, 2022 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.
Recommended Posts