HTMLEditor: Fix nested numbered list counter resetting (T1320286)#32582
HTMLEditor: Fix nested numbered list counter resetting (T1320286)#32582r-farkhutdinov wants to merge 3 commits intoDevExpress:26_1from
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes nested numbered list counter resetting in the HTMLEditor component (T1320286). The issue was that nested ordered lists were incorrectly resetting their parent list's counter, causing numbering sequences to restart unexpectedly.
Changes:
- Added new SCSS function
add-counter-setto generate counter-set declarations for all indent levels - Moved
counter-resetfromli[data-list="ordered"]to theolelement to initialize counters at the list level - Added
counter-setproperty to base-level ordered list items (without indent classes) to properly reset nested counters
ec2fdc7 to
781fb25
Compare
| } | ||
|
|
||
| li[data-list="ordered"]:not([class*="ql-indent"]) { | ||
| counter-set: add-counter-set($max-indent); |
There was a problem hiding this comment.
The CSS counter-set property has limited browser support, particularly in older Safari versions (requires Safari 17.2+, December 2023). While the browserslist configuration targets the last 2 versions of major browsers, you should verify that this CSS property is compatible with your target browsers. Consider testing this change across different browsers, especially Safari, to ensure the nested list counters display correctly. If compatibility issues arise, you may need to implement a fallback or polyfill approach.
| counter-set: add-counter-set($max-indent); | |
| counter-reset: add-counter-set($max-indent); |
b9df329 to
07d3c8c
Compare
No description provided.