-
Notifications
You must be signed in to change notification settings - Fork 6.8k
bug(drag-drop): moved item doesn't retain inherited styles #13288
Copy link
Copy link
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/drag-dropfeatureLabel used to distinguish feature request from other issuesLabel used to distinguish feature request from other issues
Description
Bug, feature request, or proposal:
Bug
What is the expected behavior?
When dragging around an item, all styles (included the inherited ones) shall be retained to keep the look&feel consistent
What is the current behavior?
Inherithed styles are not retained
What are the steps to reproduce?
- Create a list of elements suitable for D&D
- Add
mat-typographyclass on thecdk-dropcontainer - Drag one item of the list and notice that it doesn't retain Roboto font
What is the use-case or motivation for changing an existing behavior?
Consistency
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 6.1.8
Material 6.4.7
Is there anything else we should know?
As a workaround it's possible to add to items a class with all needed styles which would have been inherited from the container.
Being moved to root level (aka out of it's normal containers and CSS rules flow) for the duration of the dragging event, the item should have all currently applied inherited CSS rules copied to avoid inconsistent look&feel
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/drag-dropfeatureLabel used to distinguish feature request from other issuesLabel used to distinguish feature request from other issues