How can I target headings with inline style 'text-align: center' in my CSS so that I can add ::after styling to them? This is for a WordPress CMS, specifically to modify content in the WYSIWYG editor used by clients.
Here's an example of the stylesheet I have for headings with the class .textcenter:
.textcenter h1::after {
content: '';
display: block;
margin: 5px auto 0;
width: 150px;
height: 2px;
background: rgb(18,113,183);
background: linear-gradient(90deg, rgba(18,113,183,1) 0%, rgba(18,113,183,1) 50%, rgba(152,195,59,1) 50%, rgba(152,195,59,1) 100%); }
I also want this styling to be applied to any headings created by clients like:
<h1 style="text-align: center;">....</h1>
Is there a way to achieve this?
Thank you in advance!