atom / markdown-preview

📝 Markdown preview in Atom
MIT License
1.23k stars 358 forks source link

UI: task list checkboxes in the editor's theme #592

Open Benni3-1415 opened 3 years ago

Benni3-1415 commented 3 years ago

Description of the Change

  1. The checkboxes are getting the input-checkbox tag in Javascript, so that they are rendered like the editor's checkboxes.
  2. The obsolete settings are removed from the global style sheet.
  3. The editor's theme will be overwritten in the GitHub theme file.
  4. The position and margin adjustments are made for the different themes (including GitHub's).

Alternate Designs

Benefits

This lets the task lists checkboxes use the editor's theme (in the default preview mode):

tasklist

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, ```html
  • Check
``` how a list with a checkbox doesn't get the class `tasklist` assigned.