I implemented the 'class', 'class_',' and 'style' list arguments. Version b3 looks like it was never frozen for release, so that will be the next version. My next steps, not necessarily in this order, are: reimplementing the HTML builder, converting the tests to py.test, the Python 3 port, and some small reorganizations. The online docs don't yet mention the list arguments or the underscore to hyphen conversion (for data-foo).
On Sat, Jun 29, 2013 at 9:08 PM, Mike Orr <sluggos...@gmail.com> wrote: > On Sat, Jun 29, 2013 at 3:11 PM, Marius Gedminas <mar...@gedmin.as> wrote: >> On Fri, Jun 28, 2013 at 02:04:08PM -0700, Mike Orr wrote: >>> I'd also like feedback on another idea. I'm thinking about adding arguments >>> to build up the class attribute and style attribute piecemeal: >>> >>> make_tag(..., classes=["foo", "bar"]) => ' ... class="foo bar"' >>> >>> make_tag(..., styles=["margin:0", "padding: 1ex"]) => '... >>> style="margin:0; padding: 1ex") >>> >>> Would this be useful to others? >> >> Yes! >> >>> Would the names collide with any other >>> potential attributes? (I don't think so since HTML doesn't define "styles" >>> and "classes", and is unlikely to because of user confusion.) Is there a >>> better API? >> >> What about >> >> make_tag(..., style=["margin: 0", "padding: 1ex"]) >> >> and >> >> make_tag(..., class_=["foo", "bar"]) >> >> i.e. overload the type of the attribute instead of the name? > > That might work. And it would avoid the need to check for both keywords. -- Mike Orr <sluggos...@gmail.com> -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel+unsubscr...@googlegroups.com. To post to this group, send email to pylons-devel@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-devel. For more options, visit https://groups.google.com/groups/opt_out.