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

feat(content-switcher): add shadow parts #11904

Conversation

Valentin-Sorin-Nicolae
Copy link
Contributor

ADCMS-5315

Description

All non-slot elements in the shadow DOM should be given a unique "part" name allowing CSS to target and override component default styles. This is for the "content-switcher" component.

Changelog

New

Adding the shadow parts for the "content-switcher" component and documentation.

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Jul 3, 2024

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Jul 3, 2024

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Jul 3, 2024

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Jul 3, 2024

Copy link
Contributor

@m4olivei m4olivei left a comment

Choose a reason for hiding this comment

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

One small item missed. See comment.

@@ -133,6 +136,7 @@ export default class CDSContentSwitcherItem extends FocusMixin(LitElement) {
type="button"
role="tab"
class="${className}"
part="button"
Copy link
Contributor

Choose a reason for hiding this comment

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

This is great. There is also a child <span> element that needs a part name as well. Probably label makes sense as a name for that one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, thanks!

Copy link
Contributor

@m4olivei m4olivei left a comment

Choose a reason for hiding this comment

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

Thanks! Just pushed a quick commit to cover the docs for the added label shadow part. All set.

@m4olivei m4olivei merged commit df3171c into carbon-design-system:feat/v2-shadow-parts Jul 8, 2024
6 of 11 checks passed
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.

None yet

3 participants