Following a persistent idea from admin themes such as root candy, I've written this patch to use color codes in buttons.
It will create three standard classes to be used in forms
- button-main
- button-warning
- link-warning
The first in intended to be used with the main action button in form (Save settings, Publish node, Apply)
The other two are intended to be used with potentially destructive actions, such as Delete, either with buttons or links.
This patch changes all core forms to use those three classes and implements the color codes in Garland
Notes:
The Garland/Minnelli base.png images are in the .tar.gz file.
I made a screenshot with the Garland default and Shiny Tomato colors schemes.
| Comment | File | Size | Author |
|---|---|---|---|
| screenshot.png | 4.26 KB | danillonunes | |
| buttons_styles-25-05-09.tar_.gz | 62.46 KB | danillonunes | |
| buttons_styles-25-05-09.patch | 36.11 KB | danillonunes |
Comments
Comment #1
danillonunes commentedadding tags
Comment #2
ejort commentedI like this idea and it's definitely something that I think is missing from Drupal's forms (giving a heirarchy to the buttons). I had a quick scan of the patch, and it is mostly fairly straight forward. One thing that I would question however is:
You should add the standard version of 'border-radius' at the end of the vendor specific declarations so that current / future browsers that support the standards based property will pick this up as well (and in preference to the vendor specific versions). 'outline-radius' isn't a part of the CSS standards as far as I know so this doesn't apply to it.
eg:
Comment #3
Noyz commentedNot a fan personally. Buttons and links need to be really consistent. If there are warnings on the page, the warnings should be carried through via messaging. Messaging is more appropriate to color coordinate. I could see this getting out our hand where messages and buttons are both color coordinated - thereby creating a kaleidoscope of a UI.
Comment #4
Bojhan commentedSorry, this is indeed not consistent and it would really distract from one filling out a form.