Answer the question
In order to leave comments, you need to log in
Component styles after main perhaps?
I can't stand it important! When I write projects from scratch, I set the priorities so that important is not needed. But!
The fact is that by default in Bitrix the main file template_styles.css
is connected last.
and the styles of the components are in front of it) This is not logical, and I throw a stone into the garden for the system developers.
Began to leaf through docks, but found nothing. I do not consider it logical to pick the core.
So who can come across? How can I make component styles appear after the main ones?
Answer the question
In order to leave comments, you need to log in
Styles can be overridden not only with !important , but also with a more extended rule using any parent.
That is, if we have:
<div class= 'parent'>
<div class= 'child'>
Текст
</div>
</div>
.child { color: red; }
.parent .child { color: blue; }
As for me, styles and scripts should not be scattered over the components - then you are tormented to look for and edit them. Put everything in one place. CSS, for example, only write in the same template_styles.css. Then the problem of the task will be solved and you won’t have to look for anything on the project every time you need to correct something.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question