C
C
Chingiz Mammadov2018-12-04 14:43:54
1C-Bitrix
Chingiz Mammadov, 2018-12-04 14:43:54

Bitrix, how to get rid of wrapper elements?

Hello. Bitrix creates wrapper elements for other elements or adds classes that were not planned at all in advance and the added styles have to be rewritten, but this is not an option. Searched, but did not find a normal solution. Help me please. solve this problem. I will be very grateful. Thanks in advance!)
Added an image for a clearer picture of the situation.
5c0669c55395c005967282.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Sinitsyn, 2018-12-04
@a_u_sinitsin

It's just that when making a template "for Bitrix" you need to take this into account. Correct styles do not break )
A couple of tips:
1) Do not overlap tag styles globally - this can break the dialogs of Bitrix itself.
input {...}
a {...}
etc.
2) Nesting resistance - will not fall when adding intermediate blocks.
.container > .item {...} - will fall when wrapping around item
.container .item:last-child {...} - wrapping will become last-child and everything will break
, etc.
In general, BEM (or something like that) will help you)

C
Chingiz Mammadov, 2018-12-04
@ChingizMI

5c0669c55395c005967282.png Added an image for a clearer picture of the situation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question