Surcharger le style !important des posts du thème Divi 4.9 installé sur WordPress 5.7
Le CSS de Divi utilise !important ce qui rend difficile de pouvoir le surcharger...
Le HTML :
<div class="et_pb_text_inner"><p class="symbols">
<svg class="svg-inline--fa fa-sun fa-w-16 symbols" aria-hidden="true" focusable="false" data-prefix="far" data-icon="sun" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" data-fa-i2svg="">
<path fill="currentColor" d="M494.2 221.9l-59.....56-56 56z"></path>
</svg>
<!-- <i class="far fa-sun symbols"></i> Font Awesome fontawesome.com --></span></p></div>
Le CSS :
.et_pb_blog_0 .et_pb_post, .et_pb_blog_0 .et_pb_post .post-content * {
color: #505050 !important;
}
La surcharge CSS :
p.symbols {
color: #8300E9 !important;
line-height: 4rem;
}
.et_pb_blog_0 .et_pb_post .post-content .svg-inline--fa > path:nth-child(1) {
color: #8300E9 !important;
}
Et ça marche
Source : https://www.businessbloomer.com/woocommerce-divi-override-important-css/