Mpdf: Add support for CSS :before and :after pseudo-selectors

Created on 6 Jun 2018  路  3Comments  路  Source: mpdf/mpdf

I would like to have this new functionality

Is there a chance pseudo-selectors :before and :after will be supported in future?
Or do I still have to work around with pre-parsing the HTML Code

This is a HTML/CSS code snippet I use

<p>Some long text.</p>
<hr>
<p>Some other long text.</p>

This is a CSS code snippet I use

hr {
    visibility: hidden;
    height: auto;
    &:before {
      content: '***';
      display: block;
      visibility: visible;
      width: 100%;
      height: 1.5em;
      text-align: center;
    }
  }

Related Issues

318 Add support for CSS :first-child pseudo-selector

HTMCSS support featurenhancement help wanted

Most helpful comment

thanks obama

All 3 comments

pseudo-selectors :before and :after will be supported in future?

thanks obama

since this seems to be a sore spot but still kinda needed - is it possible to piggy back off of what dompdf did.

i was able to get fontawesome's fa-ul functionality working but have been unsuccessful thus far with mPDF.

dompdf doesn't have some of support i need either.

Was this page helpful?
0 / 5 - 0 ratings