Bug in external stylesheet link

General TRichView support forum. Please post your questions here
Post Reply
wvd_vegt
Posts: 83
Joined: Tue Aug 30, 2005 7:39 am

Bug in external stylesheet link

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17310
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
Post Reply