Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colors v3 #45

Merged
merged 43 commits into from
Apr 7, 2022
Merged

Colors v3 #45

merged 43 commits into from
Apr 7, 2022

Conversation

Studio384
Copy link
Collaborator

@Studio384 Studio384 commented Apr 4, 2022

Fixes #43

This pull request further reworks our color system.

Changes

  • Improve the naming and availablity of the various colors as well as their semantic naming.
  • Improve color documentation with more contrast information.
  • Rework color weighting.
    • Add alpha color variant for every color scale.
    • Remove redundant and unused color variants, remap weights accordingly.
    • Move base from 700 to 600.
    • Add dark mode variant for every color scale.
  • Support color variable in more components.
    • Pagination
    • List item
    • Form controls
    • Dropdown
    • Pivot
  • Support dark mode.
    • Check existing components for full support.

Color weights

The core color weights will be reduced from 12 to 10, scrapping one background surface variant and one border variant.

Color 50 100 200 300 400 500 Base 700 800 900 Contrast Alpha
Old 50 100 200 300 400 500 550 600 700 750 800 900 text
New 50 100 200 300 400 500 600 700 800 900 text 600a

Bold is the base color. All existing colors are being remapped to the value underneath them. With the exception of 600, which will be updated to be between the old 550 and 600 variants. Additionally, a 600a variant is being added, which will be a transparent variant of the new 600 color.

Features

  • Pagination rework: the pagination component has been updated with a new design and now uses CSS variables to support various color variants, it will still default to the accent color.
  • Colored lists: support for color classes has been added to lists, replacing list-item-danger with list-item-colored red.
  • Colored pivots: pivots now support the color classes. Pilled pivots now have a clear hover state.
  • Colored forms: forms now support the color classes.
  • Colored dropdowns: dropdown menus now support the color classes.
  • CSS variable: the full color palette is now available as CSS variable.
  • Dark and system theme support: Mellow has built-in support for a dark and light theme.
    • New text, border, and background utility classes to work with the light and dark theme and their inverse.

Classes

New classes

  • .list-item-colored
  • .light
  • .system
  • .dark
  • .bg-system(-inverse)
  • .text-system(-inverse)
  • .border-system(-inverse)

Removed classes

  • .list-item-danger

Documentation changes

These changes have been made to the documentation beyond the changes listed above.

  • Updates list documentation to use radio and checkbox classes.
  • Updates list documentation with danger variant in "Complex example".
  • Introduces theme-aware syntax highlighting for Hugo's built-in highlighter. The theme is based on monokai and monokailight with minor changes.

@Studio384 Studio384 added the enhancement New feature or request label Apr 4, 2022
@Studio384 Studio384 added this to the Mellow CSS 1.0 milestone Apr 4, 2022
@Studio384 Studio384 self-assigned this Apr 4, 2022
@Studio384 Studio384 mentioned this pull request Apr 4, 2022
32 tasks
@Studio384 Studio384 merged commit c2886a2 into main Apr 7, 2022
@Studio384 Studio384 deleted the colors branch April 11, 2022 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Colors 3.0
1 participant