Desktop: Custom CSS: Add cm-listItem class to lines with list items, don't add region start/end markers for items that are always single-line #11291
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.
Summary
The goal of this pull request is to simplify custom styling of the CodeMirror 6-based editor:
cm-regionFirstLine
andcm-regionLastLine
classes to regions that are always single-line.Note
This currently targets
release-3.1
. Previously, certain list-specific custom styles were impossible (or very difficult) to migrate from CodeMirror 5 to CodeMirror 6.Screenshot
CSS comparison
class="cm-h1 cm-headerLine cm-header cm-regionFirstLine cm-regionLastLine cm-line"
class="cm-h1 cm-headerLine cm-header cm-line"
class="cm-mathBlock cm-regionFirstLine cm-line"
class="cm-mathBlock cm-line"
class="cm-mathBlock cm-regionLastLine cm-line"
class="cm-mathBlock cm-regionFirstLine cm-line"
class="cm-mathBlock cm-line"
class="cm-mathBlock cm-regionLastLine cm-line"
class="cm-line"
class="cm-line"
class="cm-line"
class="cm-orderedList cm-regionFirstLine cm-listItem cm-line"
class="cm-orderedList cm-listItem cm-line"
class="cm-orderedList cm-regionLastLine cm-listItem cm-line"
class="cm-line"
class="cm-line"
class="cm-line"
class="cm-unorderedList cm-regionFirstLine cm-listItem cm-line"
class="cm-unorderedList cm-listItem cm-line"
class="cm-unorderedList cm-regionLastLine cm-listItem cm-line"
Note: This pull request does not make it possible to consistently style even/odd list items differently (without a plugin).