Page 1 of 1

Bug in external stylesheet link

Posted: Tue Oct 04, 2005 2:23 pm
by wvd_vegt
Hi,

Small xhtml releated bugreport:

when I export to xhtml with an external css stylesheet, the link tag isn't property closed.

Line 2758 in CRVData.pas:

Code: Select all

        RVWriteLn(Stream, '<link type="text/css" href="'+s+'" rel="stylesheet">');
Should read:

Code: Select all

        RVWriteLn(Stream, '<link type="text/css" href="'+s+'" rel="stylesheet" />');
Another issue might be that the resulting xhtml file still holds the following inline style:

Code: Select all

<style type="text/css">
body {
  margin: 5px 5px 5px 5px;
  background-color: #ffffff;
}
</style>
which i would expect to be saved into the external css file too.

Posted: Tue Oct 04, 2005 8:19 pm
by Sergey Tkachenko
Thank you. The code for this line must be:

RVWriteLn(Stream, '<link type="text/css" href="'+s+'" rel="stylesheet"'+RV_HTMLGetEndingSlash(Options)+'>');

As for saving background properties in external CSS, I added it in to-do list. Several new properties/options must be added to implement it, because it's currently expected that external CSS is created by TRVStyle, and TRVStyle, but margins and background are properties of TRichView, not TRVStyle.