Forum Bugs

border-clip for footnote areas only?

mn4367
I have the following document:

<!DOCTYPE html>
<html>
<head>
    <style type="text/css">
        @page {
          @footnotes {
            border-top: 0.5pt solid black;
            border-clip: 5cm;
            padding-top: 0.5em;
          }
        }
      .footnote {
        float: footnote;
      }
     .mydiv {
        border-top: 0.5pt solid black;
        border-clip: 5cm;
        padding-top: 0.5em;
        background-color: yellow;
    }
    </style>
</head>
<body>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.<span class="footnote">This is a footnote.</span></p>

<div class="mydiv">Lorem ipsum dolor sit amet.</div>
</body>
</html>


In the footnote area the border-clip property creates a nice black line with a length of 5cm. If I use the same property for a div, the border isn't clipped. Is that by intention? Is border-clip a special PrinceXML CSS property? I've found no reference to it at the usual places.

It would be nice if border-clip is supported not only for footnote areas.
  1. test.pdf10.2 kB
mikeday
Currently in Prince it only applies to footnote areas. The border-clip property is being proposed for CSS4. It has been renamed a few times, and used to be called border-length. I don't think it has browser support yet.

In the <div> situation, you could put an empty block at the beginning of the div with a top border and a fixed width. Perhaps you could even use the ::before pseudo-element for this:
div.mydiv::before {
    content: "";
    display: block;
    border-top: 0.5pt solid black;
    width: 5cm
}
mn4367
OK, no problem, thanks!