In a discussion with @oliverschuerch, the question about prefixes for parts arose.
/* Unprefixed part, scoped by the element selector */
post-accordion,
post-accordion-item {
&::part(button) {
color: red;
}
}
/* Prefixed part with our default prefix */
::part(post-accordion-button) {
font-size: 20px;
}
If un-scoped parts are being used, e.g. ::part(button), it's way simpler to write and multiple button parts can be targeted at the same time, but we're risking that a global style for another button part is interfering with our own parts.
Currently, we're using parts on some web components with generic names. Re-naming them would be breaking changes.
In a discussion with @oliverschuerch, the question about prefixes for parts arose.
If un-scoped parts are being used, e.g.
::part(button), it's way simpler to write and multiple button parts can be targeted at the same time, but we're risking that a global style for another button part is interfering with our own parts.Currently, we're using parts on some web components with generic names. Re-naming them would be breaking changes.