On Mon, 2011-02-14 at 21:58 +0000, Dave Higton wrote: > In message <1297713411.8764.20.camel@duiker> > John-Mark Bell <j...@netsurf-browser.org> wrote: > > > > There is a defined place in the CSS cascade for these legacy > > presentational hints. However, until we replaced NetSurf's original CSS > > implementation with libcss, there was no mechanism for allowing the > > presentational hints to be used when determining the styling of an > > element. What support did exist for them at the time mostly comprised > > layers of ugly hackery to approximate the right thing. Invariably, this > > went wrong. > > > > Today, however, we do have the appropriate hooks in place. Thus > > supporting all of these legacy presentational hints is relatively > > trivial and totally opaque to most of the browser. > > > > If someone feels adventurous, they could compare section 10.2 of the > > HTML5 specification (specifically, anything where "presentational hint" > > is mentioned) with the node_presentational_hint function in css/select.c > > in NetSurf's sources to see what's missing. > > Thanks for your response, John. > > It's curious that two so similar constructions behave so differently: > > <p><font face="monospace"> doesn't work;
This is a legacy presentational hint -- see the explanation I gave above as to why NetSurf ignores it at present. Essentially, NetSurf is currently missing an implementation of the mapping from the face attribute of the font element to the corresponding CSS font-family representation. > <p style="font-family:monospace"> does work, The style attribute contains CSS declarations for the element. These are not treated in the same way as presentational hints, as they have differing requirements. They work in NetSurf as support for them simply falls out of having any kind of CSS implementation at all. John.