Skip to content

Conversation

@JammingBen
Copy link
Contributor

@JammingBen JammingBen commented Aug 20, 2025

Migrates color and background-color to Tailwind.

Migration

The theme color roles now exist as tailwind variables and can be used like so: bg-role-primary, text-role-on-primary. This also supports variations, e.g. hover:text-role-on-primary or bg-role-primary/50.

Also these oc-helper classes are now redundant:

  • oc-text-muted > text-role-on-surface-variant
  • oc-text-error > text-role-on-error

refs #937

@JammingBen JammingBen self-assigned this Aug 20, 2025
@JammingBen JammingBen force-pushed the refactor/colors-tailwind branch 6 times, most recently from 8b89cb7 to a6a4d9e Compare August 21, 2025 10:58
@JammingBen JammingBen marked this pull request as ready for review August 21, 2025 11:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates color and background-color styling from CSS variables to Tailwind utility classes. The migration introduces new utility classes in the design system for color roles (oc-role-{name}) and replaces legacy classes like oc-text-muted and oc-text-error with semantic role-based equivalents.

Key changes:

  • Introduction of new Tailwind utility classes for color roles in the design system layer
  • Migration of inline CSS color/background properties to Tailwind classes
  • Replacement of legacy helper classes with semantic role-based equivalents
  • Removal of redundant CSS color definitions in favor of utility classes

Reviewed Changes

Copilot reviewed 138 out of 138 changed files in this pull request and generated 7 comments.

File Description
packages/design-system/src/styles/colors.css New utility classes for color roles
packages/design-system/src/styles/layers.css Integration of new color utilities
Various component and test files Migration from CSS variables to Tailwind classes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@JammingBen JammingBen marked this pull request as draft August 21, 2025 12:27
@JammingBen JammingBen force-pushed the refactor/colors-tailwind branch 5 times, most recently from 74ebc95 to 835af1a Compare August 22, 2025 08:53
@JammingBen JammingBen force-pushed the refactor/colors-tailwind branch from 835af1a to ae14b8f Compare August 22, 2025 09:10
@JammingBen JammingBen marked this pull request as ready for review August 22, 2025 09:48
@JammingBen JammingBen merged commit 614078b into main Aug 22, 2025
29 checks passed
@JammingBen JammingBen deleted the refactor/colors-tailwind branch August 22, 2025 13:28
@openclouders openclouders mentioned this pull request Aug 22, 2025
1 task
openclouders pushed a commit that referenced this pull request Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants