K
K
kostyasurkin2020-02-02 12:20:16
css
kostyasurkin, 2020-02-02 12:20:16

IE11 doesn't see classes starting with "--". How to fix?

Good afternoon. I use Sass + BEM. I make modifiers context-sensitive, for example The same "--size_big" modifier can change the properties of another block/element differently. Already used to it, no need to drag a footcloth from the name of the block / element. Question - IE11 does not see classes starting with a double dash, everything is ok in chrome. How to fix? Replace double dash with another character?
<p class = "title --size_big">

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2020-02-02
@kostyasurkin

Double hyphen is used in custom properties (css variables)
It is strongly discouraged to use classes starting with double hyphen.
PS.
Why not use BEM in a human way, like everyone else?

<p class = "title title_size_big">
</p>

firstly, there are no conflicts,
and secondly, other developers will not have to rack their brains about what the hell is BEM like here ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question