The file:
@atlaskit/calendar/dist/esm/internal/components/date.compiled.css
defines the class:
._kkk2n7od { all: unset; }
which is used internally by @atlaskit/calendar.
However, the same class definition appears in other packages as well, for example:
• @atlaskit/editor-plugin-date/node_modules/@atlaskit/calendar/dist/esm/internal/components/date.compiled.css
• @atlaskit/smart-card/dist/esm/view/FlexibleCard/components/blocks/action-block/action-footer/index.compiled.css
• @atlaskit/smart-card/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.compiled.css
• @atlaskit/smart-card/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.compiled.css
Vite injects all CSS into the head element (e.g.,
<style type="text/css" data-vite-dev-id="/app/node_modules/@atlaskit/smart-card/dist/esm/view/FlexibleCard/components/blocks/action-block/action-footer/index.compiled.css">
). As a result, the later-loaded definition of ._kkk2n7od { all: unset; } overrides earlier definitions, causing elements that rely on the @atlaskit/calendar styles to be reset and rendered incorrectly.
In our case, the calendar styles are loaded before the conflicting ones from smart-card and other dependencies, leading to broken styling for calendar components.
Questions:
-
How can this issue be resolved?
-
Why do these packages compile and distribute CSS with identical class names?