Commits

xiaq  committed 664f348

Tag some <label>s with css class "moin-inline-label" and make them inline.

Default style for <label> changed to display:block at some point, but inline
labels are still required in some places.

The css files have been regnerated from stylus sources.

  • Participants
  • Parent commits 78a484e

Comments (0)

Files changed (5)

File MoinMoin/templates/forms.html

 {% macro _valued_label(field, value, contents=none) %}
   {# XXX Patch <label>'s `for` attribute with value when element referred to is
      checkbox or radio. See: https://bitbucket.org/jek/flatland/issue/9 #}
-  {{ gen.label(field, for='f_{0}_{1}'.format(field.flattened_name(), value), contents=contents) }}
+  {{ gen.label(field, for='f_{0}_{1}'.format(field.flattened_name(), value), contents=contents, **kwargs) }}
 {% endmacro %}
 
 {% macro _checkbox_label(field) %}
-  {{ _valued_label(field, '1') }}
+  {{ _valued_label(field, '1', **kwargs) }}
 {% endmacro %}
 
 {% macro _radio_label(field, value) %}
-  {{ _valued_label(field, value, value) }}
+  {{ _valued_label(field, value, value, **kwargs) }}
 {% endmacro %}
 
 {% macro inline_checkbox(field) %}
   {{ raw_input(field, 'checkbox') }}
-  {{ _checkbox_label(field) }}
+  {{ _checkbox_label(field, class='moin-inline-label') }}
   {{ render_errors(field) }}
   {% if field.properties.helper is defined %}
     <span class="helper-text">
 {% endmacro %}
 
 {% macro small_natural(field) %}
-    {{ gen.label(field) }}
+    <dt>
+        {{ gen.label(field) }}
+    </dt>
     <dd>
         {% for i in range(field.properties.lower, field.properties.upper+1) %}
             {{ gen.input(field, type='radio', value=i|string) }}
-            {{ _radio_label(field, value=i|string) }}
+            {{ _radio_label(field, value=i|string, class='moin-inline-label') }}
         {% endfor %}
     </dd>
 {% endmacro %}

File MoinMoin/themes/foobar/static/css/common.css

 article, aside, canvas, details, figcaption, figure, footer, header, hgroup,
 menu, nav, section, summary, time, mark, audio,
 video { margin: 0; padding: 0; border: 0; outline: 0;
-          font-size: 100%; vertical-align: baseline; background: transparent; }
+            font-size: 100%; vertical-align: baseline; background: transparent; }
 body { line-height: 1; }
 article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav,
 section { display: block; }
 .moin-history-rename:before{content:url("../img/moin-renamed.png")}
 .moin-history-copy:before{content:url("../img/moin-new.png")}
 .moin-integer{width:2%}
+.moin-inline-label{display:inline}
 .moin-history-links{width:5%;}
 .moin-history-links a{display:block}
 .moin-history-editortext,.moin-history-links span,.moin-history-comment span{color:#d6d5d0;display:block;margin-bottom:5px}
 ol.moin-lowerroman-list{list-style-type:lower-roman}
 ul.moin-tags{list-style:none;}
 ul.moin-tags li{display:inline;}
-ul.moin-tags li.weight0{font-size:.4822530864197532em}
+ul.moin-tags li.weight0{font-size:.4822530864197531em}
 ul.moin-tags li.weight1{font-size:.5787037037037037em}
-ul.moin-tags li.weight2{font-size:.6944444444444445em}
+ul.moin-tags li.weight2{font-size:.6944444444444444em}
 ul.moin-tags li.weight3{font-size:.8333333333333334em}
 ul.moin-tags li.weight4{font-size:1em}
 ul.moin-tags li.weight5{font-size:1.2em}
 ul.moin-tags li.weight6{font-size:1.44em}
-ul.moin-tags li.weight7{font-size:1.7279999999999998em}
+ul.moin-tags li.weight7{font-size:1.728em}
 ul.moin-tags li.weight8{font-size:2.0736em}
-ul.moin-tags li.weight9{font-size:2.4883199999999994em}
-h1{font-size:1.7279999999999998em;margin:.5787037037037038em 0;border-bottom:3px solid #ccc;padding-bottom:3px}
+ul.moin-tags li.weight9{font-size:2.48832em}
+h1{font-size:1.728em;margin:.5787037037037037em 0;border-bottom:3px solid #ccc;padding-bottom:3px}
 h2{font-size:1.44em;margin:.6944444444444444em 0;border-bottom:3px solid #ccc;padding-bottom:3px}
 h3{font-size:1.2em;margin:.8333333333333334em 0;border-bottom:2px solid #ccc;padding-bottom:2px}
 h4{font-size:1em;margin:1em 0;border-bottom:2px solid #ccc;padding-bottom:2px}
 h5{font-size:.8333333333333334em;margin:1.2em 0;border-bottom:1px solid #ccc;padding-bottom:1px}
-h6{font-size:.6944444444444445em;margin:1.4399999999999997em 0;border-bottom:1px solid #ccc;padding-bottom:1px}
+h6{font-size:.6944444444444444em;margin:1.44em 0;border-bottom:1px solid #ccc;padding-bottom:1px}
 a.permalink{display:none;cursor:pointer;margin-left:.1em;color:#616161;}
 a.permalink:hover{color:#000}
 h1:hover .permalink,h2:hover .permalink,h3:hover .permalink,h4:hover .permalink,h5:hover .permalink,h6:hover .permalink{display:inline;text-decoration:none}

File MoinMoin/themes/foobar/static/css/stylus/main.styl

 .moin-integer
     width 2%
 
+.moin-inline-label
+    display inline
+
 .moin-history-links
     width 5%
     a

File MoinMoin/themes/modernized/static/css/common.css

 /*
 /* common.css - MoinMoin Default Styles
 
-  Copyright: 2001, 2002, 2003 MoinMoin:JuergenHermann
-  Copyright: 2010 MoinMoin:DiogenesAugusto
-  Copyright: 2010 MoinMoin:RogerHaase
-  License: GNU GPL v2 or later, see COPYING for details.
+    Copyright: 2001, 2002, 2003 MoinMoin:JuergenHermann
+    Copyright: 2010 MoinMoin:DiogenesAugusto
+    Copyright: 2010 MoinMoin:RogerHaase
+    License: GNU GPL v2 or later, see COPYING for details.
 */
 /*
 Copied from:  http://code.google.com/p/html5resetcss/
 article, aside, canvas, details, figcaption, figure, footer, header, hgroup,
 menu, nav, section, summary, time, mark, audio,
 video { margin: 0; padding: 0; border: 0; outline: 0;
-          font-size: 100%; vertical-align: baseline; background: transparent; }
+            font-size: 100%; vertical-align: baseline; background: transparent; }
 body { line-height: 1; }
 article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav,
 section { display: block; }
 .moin-big{font-size:1.17em}
 .moin-small{font-size:.83em}
 .moin-integer{text-align:right;padding-right:1em}
+.moin-inline-label{display:inline}
 h1{font-size:2em;margin:.67em 0;border-bottom:5px solid #4e7da9;padding-bottom:5px}
 h2{font-size:1.5em;margin:.75em 0;padding-bottom:4px}
 h3{font-size:1.17em;margin:.83em 0;padding-bottom:3px}

File MoinMoin/themes/modernized/static/css/stylus/main.styl

     text-align right
     padding-right 1em
 
+.moin-inline-label
+    display inline
+
 h1
     font-size 2em
     margin .67em 0