#33689: Django theme color variables are inconsistently named and poorly documented -------------------------------------+------------------------------------- Reporter: Murray Chapman | Owner: nobody Type: | Status: new Cleanup/optimization | Component: contrib.admin | Version: 4.0 Severity: Normal | Resolution: Keywords: theme dark mode | Triage Stage: Accepted color variables documentation | Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by Murray Chapman): Replying to [comment:1 Carlton Gibson]: > (Out of interest, were you proposing to create the style guide? 🙂) This should probably be done by someone with a modicum of visual design talent, which I don't have 🙂, and familiarity with the Django admin's existing visual style.... which I don't see documented or described anywhere. There are probably people more passionate and experienced about this than me, so I'll defer to any of them. I can offer some guidance based on a long career building websites, though: Scope:: (''Not suggesting that these need to be done as part of this ticket, but they should be kept in mind'') * be mindful that visual theme overlaps with usability, accessibility, brand identity, and widget design * there are things beyond color that should be made variables (e.g. margins; border width/radius) Consistency:: * variables should be consistently named, and refer to concepts rather than specific use cases or colors * it should be easy to determine the target of a color: Text? Background? Border? Shadow? * text/background color variables should always be paired (current implementation makes assumptions about text/background pairings that are difficult to deduce) Completeness:: * every color should be a variable (some are still hardcoded) * every variable should be documented and an example given Accessibility:: * accessibility issues like visual impairment and color blindness should be considered (good work already done on improving visual contrast) * usability best practices strongly discourage using color alone to communicate meaning or state (e.g. don't use a red background and assume people will know that means "error". Should be accompanied by verbiage or an icon) Maintainability:: * very helpful for developers would be a visual "crib sheet" that shows all colors/widgets on a single web view. Ideally this would be part of `contrib.admin` (so developers can test theme changes) as well as in the online documentation * future commits to stylesheets should be policed for hardcoded colors, ideally via automation * technical designs should be mindful of ease of maintenance and future expansion (e.g. introduction of other CSS variables for things like border widths) Django has '''excellent''' documentation and a high-quality/consistent visual design; I'm hoping we can get this formally defined/declared somewhere so plugin/extension authors can build consistently on top of it. -- Ticket URL: <https://code.djangoproject.com/ticket/33689#comment:2> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/01070180ba59b249-31a628de-d1d6-4e4c-80c3-70cf1712df72-000000%40eu-central-1.amazonses.com.