components icon indicating copy to clipboard operation
components copied to clipboard

Applying a text transformation in the `Styles` parameter causes unrelated text- styles to be dropped

Open codymullins opened this issue 9 months ago • 1 comments

Describe the bug Passing a text style, e.g. text-sm, will cause other unrelated styles to disappear, e.g. text-brand-800.

To Reproduce This can be reproduced by viewing the PureBreadcrumbItem:

<PureBreadcrumb>
    <PureBreadcrumbItem Href="/sites" Name="Sites"/>
    <PureBreadcrumbItem Href="/sites/1" Name="Site 1"/>
    <PureBreadcrumbItem Name="Page"/>
</PureBreadcrumb>

Expected behavior The PureBreadcrumbItem should have a smaller size, but retain the color applied via the style.

Screenshots

normal usage: image

using text-sm: image

Additional context

  • This likely stems from the StylePrioritizer and KeyExtractor.ToCssKey(...)
  • Need to confirm if this affects other style keys

codymullins avatar May 08 '24 19:05 codymullins

similar issue effects applying bg-white as the Style in PureHeader: both bg-brand-800 and bg-white are applied to the header.

codymullins avatar May 09 '24 19:05 codymullins