Template talk:Auto images: Difference between revisions
Appearance
Content deleted Content added
Line 17: | Line 17: | ||
:::: Thank you. I changed the parameter name to the respective HTML property name, because it sets alignment for the footer in addition to image captions, and it's more intuitive this way. [[User:Windroff|Windroff]] ([[User talk:Windroff|talk]]) 15:02, 8 April 2014 (UTC) |
:::: Thank you. I changed the parameter name to the respective HTML property name, because it sets alignment for the footer in addition to image captions, and it's more intuitive this way. [[User:Windroff|Windroff]] ([[User talk:Windroff|talk]]) 15:02, 8 April 2014 (UTC) |
||
:::::Ok, I like brevity myself but it's perhaps clearer now. [[User:Peter coxhead|Peter coxhead]] ([[User talk:Peter coxhead|talk]]) 21:09, 8 April 2014 (UTC) |
:::::Ok, I like brevity myself but it's perhaps clearer now. [[User:Peter coxhead|Peter coxhead]] ([[User talk:Peter coxhead|talk]]) 21:09, 8 April 2014 (UTC) |
||
== Float == |
|||
I added a parameter to the [[Template:Auto images/sandbox|template sandbox]] to float the template. You can see comparative results in the [[Template:Auto images/testcases|testcases page]]. It should not interfere with existing transclusions that use the div enclosure workaround. |
|||
[[User:Windroff|Windroff]] ([[User talk:Windroff|talk]]) 21:48, 7 April 2014 (UTC) |
Revision as of 22:35, 8 April 2014
Width Problem
There's a width mismatch between two consecutive auto images, with the second one's cont parameter set as "yes". here is an example. Windroff (talk) 20:20, 18 August 2013 (UTC)
- Good catch! It seems to arise when there are a different number of images in each row. I'm not yet sure whether it's a rounding issue, in which case it is likely to be difficult or impossible to fix because of the limitations of the template language or whether there's a logic error in the width calculations. I'm investigating. Peter coxhead (talk) 21:50, 18 August 2013 (UTC)
- I've implemented a fix, which seems to work on all the cases I've tested. I'm never sure if there are any browser-specific features in the display of images in this way, so please let me know if you see any consecutive sets which don't line up properly. Peter coxhead (talk) 22:56, 18 August 2013 (UTC)
- By the way, it can't be guaranteed to work within 1 pixel either way because of inevitable rounding errors – each row of auto images does the calculations independently so may not come up with exactly the same total width allowing for rounding. Peter coxhead (talk) 22:59, 18 August 2013 (UTC)
- Thank you very much. It works with all combinations I tested so far. Windroff (talk) 23:11, 18 August 2013 (UTC)
Caption alignment
I added a parameter to the template sandbox to set caption text alignment. You can see comparative results in the testcases page. It saves quite a lot of typing for transclusions with many images. Windroff (talk) 21:48, 7 April 2014 (UTC)
- Seems a very good idea. I'll move the change to the real template. Peter coxhead (talk) 10:04, 8 April 2014 (UTC)
- Thank you. I changed the parameter name to the respective HTML property name, because it sets alignment for the footer in addition to image captions, and it's more intuitive this way. Windroff (talk) 15:02, 8 April 2014 (UTC)
- Ok, I like brevity myself but it's perhaps clearer now. Peter coxhead (talk) 21:09, 8 April 2014 (UTC)
- Thank you. I changed the parameter name to the respective HTML property name, because it sets alignment for the footer in addition to image captions, and it's more intuitive this way. Windroff (talk) 15:02, 8 April 2014 (UTC)
Float
I added a parameter to the template sandbox to float the template. You can see comparative results in the testcases page. It should not interfere with existing transclusions that use the div enclosure workaround. Windroff (talk) 21:48, 7 April 2014 (UTC)