G
G
Grigory Dikiy2015-09-06 09:42:56
css
Grigory Dikiy, 2015-09-06 09:42:56

Overriding styles with a modifier?

Hello, how can I implement style overlap. For example, we need the following HTML:
<div class="block block--mod"></div>

.block {
    display: none;
    position: fixed;
    top: 5%;
    height: 90%;
    left: 50%;
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
    width: 960px;
}
.block--mod {
    height: 250px;
    width: 550px;
    top: 50%;
}

How to make the properties of the modifier overlap the properties of the block itself?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Turovnikov, 2015-09-06
@frilix

If the modifier styles come after the main block styles, then they must be overridden, or use the selector.block.block--mod

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question