diff --git a/src/public/stylesheets/print.css b/src/public/stylesheets/print.css index c2ac17370..55c69ebc3 100644 --- a/src/public/stylesheets/print.css +++ b/src/public/stylesheets/print.css @@ -186,26 +186,39 @@ span[style] { * TODO list check boxes */ -.note-detail-printable .todo-list__label { - --box-size: 1.3em; - --box-vert-offset: 0.17em; - --box-text-gap: 0.25em; - - padding-left: calc(var(--box-size) + var(--box-text-gap)); - /* Source: https://pictogrammers.com/library/mdi/icon/checkbox-blank-outline/ */ - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3e%3cpath d='M19%2c3H5C3.89%2c3 3%2c3.89 3%2c5V19A2%2c2 0 0%2c0 5%2c21H19A2%2c2 0 0%2c0 21%2c19V5C21%2c3.89 20.1%2c3 19%2c3M19%2c5V19H5V5H19Z' /%3e%3c/svg%3e"); - background-position: 0 var(--box-vert-offset); - background-size: var(--box-size); - background-repeat: no-repeat; +.note-detail-printable .todo-list__label * { + -webkit-print-color-adjust: exact; + print-color-adjust: exact; } -.note-detail-printable .todo-list__label:has(>input[type="checkbox"]:checked) { - /* Source: https://pictogrammers.com/library/mdi/icon/checkbox-outline/ */ - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3e%3cpath d='M19%2c3H5A2%2c2 0 0%2c0 3%2c5V19A2%2c2 0 0%2c0 5%2c21H19A2%2c2 0 0%2c0 21%2c19V5A2%2c2 0 0%2c0 19%2c3M19%2c5V19H5V5H19M10%2c17L6%2c13L7.41%2c11.58L10%2c14.17L16.59%2c7.58L18%2c9' /%3e%3c/svg%3e"); -} +@supports selector(.todo-list__label__description:has(*)) and (height: 1lh) { + .note-detail-printable .todo-list__label__description { -.note-detail-printable .todo-list__label > input[type="checkbox"] { - display: none; + /* The percentage of the line height that the check box occupies */ + --box-ratio: .75; + /* The size of the gap between the check box and the caption */ + --box-text-gap: 0.25em; + + --box-size: calc(1lh * var(--box-ratio)); + --box-vert-offset: calc((1lh - var(--box-size)) / 2); + + display: inline-block; + padding-left: calc(var(--box-size) + var(--box-text-gap)); + /* Source: https://pictogrammers.com/library/mdi/icon/checkbox-blank-outline/ */ + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3e%3cpath d='M19%2c3H5C3.89%2c3 3%2c3.89 3%2c5V19A2%2c2 0 0%2c0 5%2c21H19A2%2c2 0 0%2c0 21%2c19V5C21%2c3.89 20.1%2c3 19%2c3M19%2c5V19H5V5H19Z' /%3e%3c/svg%3e"); + background-position: 0 var(--box-vert-offset); + background-size: var(--box-size); + background-repeat: no-repeat; + } + + .note-detail-printable .todo-list__label:has(input[type="checkbox"]:checked) .todo-list__label__description { + /* Source: https://pictogrammers.com/library/mdi/icon/checkbox-outline/ */ + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3e%3cpath d='M19%2c3H5A2%2c2 0 0%2c0 3%2c5V19A2%2c2 0 0%2c0 5%2c21H19A2%2c2 0 0%2c0 21%2c19V5A2%2c2 0 0%2c0 19%2c3M19%2c5V19H5V5H19M10%2c17L6%2c13L7.41%2c11.58L10%2c14.17L16.59%2c7.58L18%2c9' /%3e%3c/svg%3e"); + } + + .note-detail-printable .todo-list__label input[type="checkbox"] { + display: none !important; + } } /*