This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
UI: task list checkboxes in the editor's theme #592
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.
Description of the Change
input-checkbox
tag in Javascript, so that they are rendered like the editor's checkboxes.Alternate Designs
-webkit-appearance: checkbox;
checkbox used for untested themes? (It would be a deviation from the editor's theme.)vertical-align: middle;
) not on the uppercase letters (It wasn't like that before.)Like in the Github's theme.
They can be aligned by using:
position: absolute;
line back to themarkdown-preview.less
file.Redirecting the
.input-checkbox
stylesheet to the checkboxes in default mode (without Javascript) so that there are no unnecessaryinput-checkbox
classes in the GitHub and exported HTML.Benefits
This lets the task lists checkboxes use the editor's theme (in the default preview mode):
Possible Drawbacks
Only the themes One, Atom, Atom Material, Seti, Nucleus Dark and Solarized are tested!
With other themes, the space between the checkboxes could be too small or the boxes could be slightly off centered.
Note
The HTML based list doesn't get the class
input-checkbox
assigned,how a list with a checkbox doesn't get the class
tasklist
assigned.