Repository navigation
List Marker Styling v2 - #265
AyUsH18102001 wants to merge 16 commits into
Conversation
|
Hello @onizet Please review the change in ParsingContext factory method invocation in ListExpression, I decided to pass styleScoped to false, for this usecase we must not only stop the inheritance of a li element to its parent ol/ul element, but it can also be influecned by its parent li element i.e. <ol style='color: red; font-size: 16px;'>
<li>One</li>
<li style='color: green;'>Two</li>
<li style='color: blue;'>Three </li>
<li style="list-style-type: none; color: magenta;">
<ol start="4">
<li>Four</li>
<li style='color: purple;'>Five</li>
</ol>
</li>
</ol> |
|
Hi @AyUsH18102001, I'm not fan that you duplicate all the styles in this container expression. This just increase the technical debt and make future maintenance more complicated as there are now 2 locations to look for basic styling such as bold. I was also doubtful to restrict the scope to only this list, but that's a single line change. |
|
Hello @onizet Thats a valid point, but I think we should only cater to specific styles for list marker element i.e. styles included in MarkerStyle record with new addons like text-decoration i.e. (underline, strike and double strike) I'll make sure to not dupliate the styles in ListExpression |
|
Hello @onizet I mis-interpreted your previous review comment, MarkerStyle although keeps a minimal styling its still the wrong approach as we would circle back to the same maintianence problem The list item element styling is cascaded by its parent list element, ApplyListMarkerStyle method parses the RunProperties of the list item paragraph and assigns it to the ParagraphMarkRunProperties I tried text-decoration: underline on the list item inline style. The text content is underlined, and the underline is present on the paragraph mark run properties, but in the output doc its not rendered on the number/marker. Thanks for the review, let me know if you require any other changes or testcase to verify |
|
Hello @onizet I've resolved the merge conflicts please review and merge Thanks |
|
Hello, What are you trying to solve with this PR? The styles are correctly cascaded to the list item, as per the call to |
|
Hello @onizet Thanks |
|
This was the requirement of the Issue #252 |
Copy of PR #262 following the latest changes by author for Issue #252
Problem Statement
List parsing skips the styling of the marker element
Example
The above list is when parsed the styles are just subjected to the Li nodes paragraphs and not to the marker, which is not the case in HTML preview
Output