GNOME Bugzilla – Bug 319753
malformed link to external stylesheet in html files
Last modified: 2005-11-03 17:05:29 UTC
Please describe the problem: the dialog in "dialogs > css > link to stylesheet" insert an html link but misses the rel="stylesheet" attribute - so the link is not understood or used by the browser. Steps to reproduce: 1. Place curser in and html file 2. goto 'dialogs > css > link to stylesheet' and select a file 3. Actual results: <link href="files/assetts/style/style.css" type="text/css" media="screen"> Expected results: <link href="files/assetts/style/style.css" rel="stylesheet" type="text/css" media="screen"> Does this happen every time? yes Other information:
You get 'rel="Stylesheet"' by choosing "Stylesheet" for "Forward Relation:". We should rework the link dialog. Maybe we could add some defaults for especially the stylesheet link dialog. Or maybe it should be split(?). Ideas, comments, concerns? severity set to enhancement, confirmed
Ok. I reworked the dialog. If you now use "dialogs > css > link to stylesheet", the dialog already contains the values for type, rel and media. More about this can be found in src/plugin_htmlbar/html.c. Closing this bug now.
Great, thanks for that Daniel. I'm not sure that media is a required attribute in this tag (see: http://www.htmlhelp.com/reference/css/style-html.html#external "The <LINK> tag also takes an optional MEDIA attribute, which specifies the medium or media to which the style sheet should be applied.") So I would prefer it wasn't given a default value. Giving default values to required attributes is to make the page work from the start, but doing the same for non required attributes gets in the way of experienced users and dumbs down the learning process for new users. But that's just my opinion, and I support meritocracy, so you decide. Duncan
You are right. Fixed. There is no default value for the media attribute.
Lovely, this great program is now a bit better. Thanks.