I have created some custom widgets for my client to use, but I want to make them stand out amidst the fifteen or so standard widgets in the admin area. How can I do this?
I have solved this problem myself and will place the solution here, but please feel free it add a better solution if you have one.
All widgets in the admin area get an
id
in the stylewidget-[global_counter]_[widget_key]-[widget_id]
, likewidget-59_monkeyman_widget_shortcut-5
(installed widget) orwidget-11_monkeyman_widget_shortcut-__i__
(an uninstalled widget in the list).If your widget key contains something unique for all your widgets (like your company name), you can use this and add a substring attribute CSS selector (which works in most browsers). In my case
div.widget[id*=_monkeyman_]
does the trick, so I add a little CSS snippet in thewidgets.php
admin page header:This gives me the following result: