[SortableList] Extend the CSS class with more predefined variables #3877
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
📖 Description
A proposal to add a few new predefined variables to the
FluentSortableList.cssto allow greater customization of both the list itself and its individual list items.I've been using the
FluentSortableListcomponent and it works great but I've got some visual requirements which are beyond the simple text based sortable items on the demo site. I'm currently working on a Kanban board which uses bespoke cards inside theFluentSortableListtemplate component.I've made use of the already supplied
--fluent-sortable-list-item-heightand--fluent-sortable-list-background-colorpredefined variables but found I need finer control of the items themselves, not just the list container as each individual item has its own border, border color and padding which can only be removed/changed by overriding CSS selectors as highlighted by @vnbaaij in a question I asked earlier today.I've added a selection of predefined variables which allow more control over how the list looks by default and when dragging/dropping list items so they can be easily added directly inside razor files to each individual component.
I've actually used the
FluentSortableListcomponent quite a bit in my project but never used it in the style outlined on the demo site and I think these added options greatly increase the flexibility of the component itself. I've almost always got another Fluent or bespoke component type inside which doesn't need extraneous padding, or borders. I think anyone else using the component with any content other than basic text or slightly different style requirements might find these useful rather than managing CSS overrides for specific list components.✅ Checklist
General
Component-specific
⏭ Next Steps