Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Button not Input
<txp:comment_preview />
produces
<input type="submit" value="Preview" name="preview" class="button" id="txpCommentPreview" />
<txp:comment_submit />
produces
<input type="submit" value="Submit" name="submit" class="button disabled" id="txpCommentSubmit" disabled="disabled" />
(or without disabled when appropriate)
The CSS in the Forms, Buttons and Comments portions of the default stylesheet accounts for a large part of the stylesheet and I think it could be reduced a bit, made easier to follow and at the same time made more logical by using Buttons instead of Inputs for these comment buttons.
When To Use The Button Element by Chris Coyier explains that buttons are form elements. You can have type="submit"
etc. Also I always associate input with a field into which I input something and not something I ‘push’. input class="button"
also goes against the grain.
I see you’ve recently changed input[type="submit"]
to [type="submit]
Phil, so perhaps you are already planning something? Thanks.
Offline
Re: Button not Input
It would save about 3 lines of CSS, that’s all, since button and input[type=submit] share the same rules. Also button tag is more buggy to style in some (albeit older) browsers.
I also don’t utilise the button class – it’s just there as an easy hook for authors.
Offline
Pages: 1