Hi Themeco,
Testing Pro 1.2.6
Question: When setting Custom CSS styles what the priority - how does it work?
Playing with Pro, for example, I create a Headline in the Header and set Custom Class my-class, the class is added to <div containing the Headline, not the <span
i.e. <div class="hm5 x-text my-class x-text-headline">
If I change my-class font-size at a breakpoint with Custom CSS
@media (max-width: 768px) {
.my-class {
font-size: 1.5em;
letter-spacing: 0.1em;
}
}
This doesn’t have any impact, to make work I need to add !important; after every style.
@media (max-width: 768px) {
.my-class {
font-size: 1.5em !important;
letter-spacing: 0.1em !important;
}
}
However if I target the specific generate span code then it works without !important;
@media (max-width: 768px) {
.hm5.x-text .x-text-content-text-primary {
font-size: 1.5em;
letter-spacing: 0.1em;
}
}
This is only one example of the many custom changes that can be made with Custom Class. Is this the only way to make it work without using !important; depending on the Element? Depending on the Element do all styles have be re-coded in Custom CSS if Elements are added/removed and therefore the generated code would be different?