Skip to content

chore: update styling guide #5437

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

Merged
merged 6 commits into from
May 9, 2025
Merged

Conversation

TarunAdobe
Copy link
Contributor

@TarunAdobe TarunAdobe commented May 6, 2025

Update Styling Documentation for SWC Components

Description

This PR documents the new guidance for maintaining styles in Spectrum Web Components (SWC). It clarifies the purpose and usage of the three stylesheets associated with each component:

  1. spectrum-[component].css: The base stylesheet originally from spectrum-css.
  2. [component]-overrides.css: The overrides stylesheet originally from spectrum-css.
  3. [component].css: The last loaded stylesheet, which serves as the SWC override stylesheet.

Additionally, it includes details about the tools/styles and theme files (s1, express, s2foundation) and updates the relevant documentation files.

Motivation and context

This change is required to provide clear and thorough styling guidance for developers working with SWC components. It addresses the confusion around the usage of multiple stylesheets and ensures that anyone can understand how to update themes and style new components effectively.

Related issue(s)

  • fixes [JIRA-1234]

Screenshots (if appropriate)


Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
  • I have added automated tests to cover my changes.
  • I have included a well-written changeset if my change needs to be published.
  • I have included updated documentation if my change required it.

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before author can update Golden Hash

Manual review test cases

  • Verify that the following docs doesn't reference to spectrum-css package

  • Read the new styling guide doc and verify if it does a good job explaining how to style our components without the spectrum-css dependency

  • Verify yarn new package works as expected

    • Pull this branch
    • yarn && yarn build
    • yarn new package
      Note: Newly generated package should have all the files mentioned in generating-components and shouldn't depend on spectrum-css.

Copy link

changeset-bot bot commented May 6, 2025

⚠️ No Changeset found

Latest commit: 69e379c

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

github-actions bot commented May 6, 2025

Branch preview

Review the following VRT differences

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

Copy link

github-actions bot commented May 6, 2025

Tachometer results

Currently, no packages are changed by this PR...

@TarunAdobe TarunAdobe force-pushed the ttomar/update-styling-guides branch from 9287d3b to c4f765c Compare May 7, 2025 07:35
@TarunAdobe TarunAdobe changed the title chore: add styling guide chore: update styling guide May 7, 2025
@TarunAdobe TarunAdobe marked this pull request as ready for review May 8, 2025 11:04
@TarunAdobe TarunAdobe requested a review from a team as a code owner May 8, 2025 11:04
@TarunAdobe TarunAdobe force-pushed the ttomar/update-styling-guides branch 2 times, most recently from 544b96f to 1748f16 Compare May 8, 2025 11:27
@TarunAdobe TarunAdobe force-pushed the ttomar/update-styling-guides branch from 1748f16 to e99fa99 Compare May 8, 2025 12:08
Copy link
Collaborator

@castastrophe castastrophe left a comment

Choose a reason for hiding this comment

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

Looks great! I'll approve once it's pointed to the CSS-Cutoff branch.

@TarunAdobe TarunAdobe changed the base branch from main to CSS-Cutoff May 8, 2025 13:37
@TarunAdobe TarunAdobe requested a review from castastrophe May 8, 2025 13:58
@TarunAdobe TarunAdobe force-pushed the ttomar/update-styling-guides branch from 4545811 to cb5c609 Compare May 8, 2025 13:59
@TarunAdobe TarunAdobe force-pushed the ttomar/update-styling-guides branch from cb5c609 to 2ffd597 Compare May 9, 2025 07:44
@TarunAdobe TarunAdobe requested a review from Rajdeepc May 9, 2025 07:45
@TarunAdobe TarunAdobe merged commit 9d4f5ed into CSS-Cutoff May 9, 2025
2 of 21 checks passed
@TarunAdobe TarunAdobe deleted the ttomar/update-styling-guides branch May 9, 2025 09:24
castastrophe pushed a commit that referenced this pull request May 9, 2025
* chore: add styling guide

* chore: remove spectrum-config and update other docs

* fix: update yarn new-package to not depend on spectrum-css

* chore: update styling guide

* chore: remove formating from plopfile
castastrophe pushed a commit that referenced this pull request May 9, 2025
* chore: add styling guide

* chore: remove spectrum-config and update other docs

* fix: update yarn new-package to not depend on spectrum-css

* chore: update styling guide

* chore: remove formating from plopfile
castastrophe pushed a commit that referenced this pull request May 9, 2025
* chore: add styling guide

* chore: remove spectrum-config and update other docs

* fix: update yarn new-package to not depend on spectrum-css

* chore: update styling guide

* chore: remove formating from plopfile
castastrophe pushed a commit that referenced this pull request May 12, 2025
* chore: add styling guide

* chore: remove spectrum-config and update other docs

* fix: update yarn new-package to not depend on spectrum-css

* chore: update styling guide

* chore: remove formating from plopfile
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.

3 participants