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

chore: adds transparent-tokens.js #3452

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

marissahuysentruyt
Copy link
Collaborator

@marissahuysentruyt marissahuysentruyt commented Dec 16, 2024

  • reads the tokens/dist/index.css
  • finds any custom properties that refer to tokens with the word "transparent" in them
  • creates new custom properties that correspond to the -rgb and -opacity values of the transparent token
  • replaces the global transparent token value with an rgba function that references the newly created custom properties instead.

Description

How and where has this been tested?

Please tag yourself on the tests you've marked complete to confirm the tests have been run by someone other than the author.

Validation steps

node ./plugins/postcss-rgb-mapping/transparent-tokens.js

Regression testing

Validate:

  1. The documentation pages for at least two other components are still loading, including:
  • The pages render correctly, are accessible, and are responsive.
  1. If components have been modified, VRTs have been run on this branch:
  • VRTs have been run and looked at.
  • Any VRT changes have been accepted (by reviewer and/or PR author), or there are no changes.

Screenshots

To-do list

  • I have read the contribution guidelines.
  • I have updated relevant storybook stories and templates.
  • I have tested these changes in Windows High Contrast mode.
  • If my change impacts other components, I have tested to make sure they don't break.
  • If my change impacts documentation, I have updated the documentation accordingly.
  • ✨ This pull request is ready to merge. ✨

@marissahuysentruyt marissahuysentruyt added wip This is a work in progress, don't judge. do not merge A flag for a branch indicating it should not be merged. labels Dec 16, 2024
@marissahuysentruyt marissahuysentruyt self-assigned this Dec 16, 2024
Copy link

changeset-bot bot commented Dec 16, 2024

⚠️ No Changeset found

Latest commit: 892feda

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Dec 16, 2024

🚀 Deployed on https://pr-3452--spectrum-css.netlify.app

Copy link
Contributor

github-actions bot commented Dec 16, 2024

File metrics

Summary

Total size: 4.27 MB*
Total change (Δ): 🔴 ⬆ 0.10 KB (0.00%)

Table reports on changes to a package's main file. Other changes can be found in the collapsed Details section below.

Package Size Δ
swatch 11.22 KB 🔴 ⬆ 0.03 KB

Details

swatch

Filename Head Compared to base
index-base.css 11.22 KB 🔴 ⬆ 0.03 KB (0.28%)
index-vars.css 11.22 KB 🔴 ⬆ 0.03 KB (0.28%)
index.css 11.22 KB 🔴 ⬆ 0.03 KB (0.28%)
* Size determined by adding together the size of the main file for all packages in the library.
* Results are not gzipped or minified.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/css-451-rgb-mapping-opacity branch from f9665ba to 7820d75 Compare December 17, 2024 21:42
- reads the tokens/dist/index.css
- finds any custom properties that refer to tokens with the word
"transparent" in them
- creates new custom properties that correspond to the -rgb and -opacity
values of the transparent token
- replaces the global transparent token value with an rgba function that
references the newly created custom properties instead.
@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/css-451-rgb-mapping-opacity branch from 7820d75 to 892feda Compare January 13, 2025 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge A flag for a branch indicating it should not be merged. wip This is a work in progress, don't judge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant