Forum Feature requests

Support for env() from CSS3

dauwhe
I found the following in the CSS3 spec for generated content in paged media (http://www.w3.org/TR/css3-gcpm/):

‘env()’
This function returns data from the local environment of the user at the time of formatting. The function accepts one of these keywords:

* env(url): returns the URL of the document
* env(date): returns the date on the user's system at the time of formatting
* env(time): returns the time on the user's system at the time of formatting
* env(date-time): returns the date and time on the user's system at the time of formatting

This would be very helpful for generating slug lines similar to those used in Quark/InDesign. We already do simple slug lines using a large negative margin on @bottom-right to keep it outside the trim (we are using crop/cross marks and bleed):

@bottom-right {
vertical-align: bottom;
margin-bottom: -40pt;
content: 'Book Title, page ' counter(page);
}

But we'd love to have a date and time stamp included in the slug as well.

Thanks,

Dave Cramer
mikeday
In Prince 8.0, dates can be manipulated using JavaScript and included in CSS generated content using the prince-script() value:
<style>
span.date { content: prince-script(getDate) }
</style>
<script>
function getDate()
{
    return (new Date()).toString();
}
</script>