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

sui-theme v9 custom-properties available #2754

Open
wants to merge 150 commits into
base: master
Choose a base branch
from
Open

Conversation

andresin87
Copy link
Member

@andresin87 andresin87 commented Aug 14, 2024

Css native custom properties

🔍 Show

TASK:

Description, Motivation and Context

This PR is using @s-ui/[email protected] which is a proposal to get ready to use css native custom tokens in brand web-apps and brand themes.

Those theme changes can be inspected in SUI-Components/sui#1804

The main handicap is the usage of SASS color functions and css rgba color standard.

### Replacing errors

When experiencing any problem related to this, the solution is color-mix CSS native color manipulation syntax. EX:

whatever {
 background-color: rgba(0,0,0,.3)
}

can be replaced to

whatever {
 background-color: color-mix(in srgb, black 70%, transparent)
}

also, for scss native color manipulation functions

whatever {
 background-color: mix($white, $color-primary, $mix-factor);
}

can be replaced to

whatever {
 background-color: color-mix(in srgb, $white #{'#{$mix-factor)}%'}, $color-primary);
}

Other utils

color-mix allows to nest its inner values

whatever {
  background-color: color-mix(in srgb, color-mix(in srgb, red 50%, yellow) 30%, blue)
}

Types of changes

  • 🪲 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🧾 Documentation
  • 📷 Demo
  • 🧪 Test
  • 🧠 Refactor
  • 💄 Styles
  • 🛠️ Tool

Screenshots - Animations

@turolopezsanabria
Copy link
Contributor

🤩

Copy link

STATEMENTS BRANCHES FUNCTIONS LINES
≍ 0= ≍ 0= ≍ 0= ≍ 0=
% 75.9 64.19 65.99 77.7
ABS 3343 / 4404 2051 / 3195 654 / 991 3164 / 4072

@andresin87 andresin87 marked this pull request as ready for review August 20, 2024 07:44
@andresin87 andresin87 changed the title chore(Root): test sui-theme v9 custom-properties available Aug 20, 2024
@SUI-Components SUI-Components deleted a comment from github-actions bot Aug 20, 2024
@SUI-Components SUI-Components deleted a comment from github-actions bot Aug 20, 2024
@SUI-Components SUI-Components deleted a comment from github-actions bot Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants