]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/bugs/class_parameter_of_img_directive_behave_not_as_documented.mdwn
Merge branch 'master' into cvs
[git.ikiwiki.info.git] / doc / bugs / class_parameter_of_img_directive_behave_not_as_documented.mdwn
1 On [[ikiwiki/directive/img/]] I read that
3 > You can also pass alt, title, class, align, id, hspace, and vspace
4 > parameters. These are passed through unchanged to the html img tag.
6 but when I pass `class="myclass"` to an img directive, I obtain
8     <img class="myclass img" ...
10 I found that this behaviour was added in commit f6db10d:
12 > img: Add a margin around images displayed by this directive.
13 >
14 > Particularly important for floating images, which could before be placed
15 > uncomfortably close to text.
16     
17 which adds to img.pm:
18     
19     if (exists $params{class}) {
20             $params{class}.=" img";
21     }
22     else {
23             $params{class}="img";
24     }
26 I would prefer if the `img` class were only added if no class attribute is
27 passed.
29 If you keep the current behaviour, please document it.
31 > [[done]] --[[Joey]]