Fix SearchField CSS selector to use lowercase data attribute

The useDefinition hook renders data attributes in lowercase,
so the CSS selector `[data-startCollapsed]` no longer matched.
Updated to `[data-startcollapsed]` to restore collapsed state
styling.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
This commit is contained in:
Johan Persson
2026-02-26 16:42:46 +01:00
parent a06731af67
commit bd3a76eac7
2 changed files with 17 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
---
'@backstage/ui': minor
---
**BREAKING**: Data attributes rendered by components are now always lowercase. This affects CSS selectors targeting camelCase data attributes.
**Migration:**
Update any custom CSS selectors that target camelCase data attributes to use lowercase instead:
```diff
- [data-startCollapsed='true'] { ... }
+ [data-startcollapsed='true'] { ... }
```
**Affected components:** SearchField
@@ -39,7 +39,7 @@
}
}
&[data-startCollapsed='true'] {
&[data-startcollapsed='true'] {
transition: flex-basis 0.3s ease-in-out, width 0.3s ease-in-out,
max-width 0.3s ease-in-out;
padding: 0;