From 85aa3c472aef83478bc577f2af1346b3488f5eb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Ord=C3=A1s?= Date: Tue, 31 Aug 2021 05:17:23 +0200 Subject: [PATCH] feature: Add styles for tasklist --- _sass/jekyll-theme-hacker.scss | 37 ++++++++++++++++++++++++++++++++++ index.md | 5 +++++ 2 files changed, 42 insertions(+) diff --git a/_sass/jekyll-theme-hacker.scss b/_sass/jekyll-theme-hacker.scss index b3123a11ce3..edd2d80d433 100644 --- a/_sass/jekyll-theme-hacker.scss +++ b/_sass/jekyll-theme-hacker.scss @@ -153,6 +153,43 @@ ul li { list-style-image:url('../images/bullet.png'); } +ul.task-list { + $checkbox-size: 1em; + + list-style: none; + padding-left: 0.5em; + + li.task-list-item { + list-style-image: none; + position: relative; + + input.task-list-item-checkbox { + display: inline-block; + margin-right: 1.2em; + width: $checkbox-size; + height: $checkbox-size; + vertical-align: middle; + -webkit-appearance: none; + -moz-appearance: none; + -o-appearance: none; + appearance: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + -o-box-shadow: none; + box-shadow: none; + outline: $checkbox-size*0.2 solid $conifer; + + &:checked { + width: $checkbox-size*0.813; + height: $checkbox-size*0.813; + margin-left: $checkbox-size*0.35; + outline: $checkbox-size*0.35 double adjust-color($conifer, $lightness: 0%); + background-color: adjust-color($conifer, $lightness: -20%); + } + } + } +} + blockquote { color: $blockquote-color; padding-left: 10px; diff --git a/index.md b/index.md index e039c9ac641..f4a187bdfdf 100644 --- a/index.md +++ b/index.md @@ -92,6 +92,11 @@ end - level 2 item - level 1 item +### What about task lists... + +- [ ] Undone task (unchecked) +- [x] Completed task (checked) + ### Small image ![Octocat](https://github.githubassets.com/images/icons/emoji/octocat.png)