@page {
margin: 20pt;
}
@page :first {
margin-top: 0pt;
}
My first @page
selector works fine at setting all page margins to 20pt. But the @page :first
selector which should set the top margin to 0 on the first page only has absolutely no effect.
This looks like a bug introduced in Dompdf 0.8.3. You can fall back to 0.8.2 or (when it's available) upgrade to the next release.
If you don't want to fall back to an earlier release you can grab a nightly download. There's a link in the Dompdf project README.