Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted December 13, 20222 yr 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.
December 13, 20222 yr Community Expert Please could you let me have an example? I can then take a look on your site, as that sounds to be incorrect
December 13, 20222 yr Author 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, 20222 yr by Monolith Board Games
December 13, 20222 yr Community Expert 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.
December 13, 20222 yr Community Expert Thanks Marc, we will create an instance quicky. Have a nice day No problem at all 🙂
December 14, 20222 yr Author 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; }
December 14, 20222 yr Community Expert 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.
December 14, 20222 yr Author 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?
December 14, 20222 yr Author Solution 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 ?
December 14, 20222 yr Community Expert 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?
December 14, 20222 yr Author I haven't changed any Invision Community theme files. Just used the custom.css and other personal files to organize our needs.
December 14, 20222 yr Community Expert In the case of a child theme, the parent theme is not ignored, no. Its just overridden
December 15, 20222 yr Author Hello marc, I would have liked to edit one of my posts, but I see that I can't.
December 15, 20222 yr Community Expert 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.
December 15, 20222 yr Community Expert 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.