Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "task-checklist",
"version": "5.1.1",
"version": "5.3",
"description": "A Warframe Task Checklist to track daily, weekly, and other tasks. Built with HTML, CSS, and vanilla JavaScript, processed with Vite.",
"type": "module",
"scripts": {
Expand Down
30 changes: 21 additions & 9 deletions sources/css/critical.css
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ body.light-mode {
padding: 0;
}

:where(button) {
cursor: pointer;
}

/* --- Base Body Styles --- */
body {
font-family: 'Inter', sans-serif;
Expand Down Expand Up @@ -196,7 +200,7 @@ h1 {
font-size: 1.75rem;
}
}
h2 {
#checklist-container h2 {
color: var(--text-header);
cursor: pointer;
display: flex;
Expand All @@ -210,14 +214,15 @@ h2 {
margin-bottom: 0.25rem;
border-bottom: 1px solid var(--border-color);
}
h2 > span:first-of-type {
#checklist-container h2 > span:first-of-type {
flex-grow: 1;
}
h2 .reset-time-local {
#checklist-container h2 .reset-time-local {
font-size: 0.75rem;
font-weight: 400;
color: var(--text-secondary);
margin-left: 0.5rem;
font-variant-numeric: tabular-nums;
}
.app-description {
color: var(--text-secondary);
Expand All @@ -237,14 +242,21 @@ h2 .reset-time-local {
}

/* --- Collapsible Section Basics --- */
.collapse-icon {
width: 1rem; height: 1rem;
transition: transform 0.3s ease-in-out;
.collapse-btn {
flex-shrink: 0;
margin-left: 0.5rem;
margin-left: 0.5em;
border: none;
display: flex;
align-items: center;
svg {
height: 1.25em;
width: 1.25em;
padding: 0.125em;
transition: transform 0.3s ease-in-out;
}
}
.section-toggle[aria-expanded="false"] .collapse-icon,
.parent-task-header[aria-expanded="false"] .collapse-icon {
.section-toggle[aria-expanded="false"] .collapse-btn svg,
.parent-task-header[aria-expanded="false"] .collapse-btn svg {
transform: rotate(-90deg);
}
.section-content, .subtask-collapsible {
Expand Down
214 changes: 198 additions & 16 deletions sources/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@
/* display: none; by default, JS will make one visible */
}

:where(label) {
cursor: pointer;
}

/* --- Content Box Element Styling (Non-Critical Parts) --- */
h2:hover {
#checklist-container h2:hover {
background-color: var(--section-header-hover-bg);
}
.task-description { color: var(--text-label); }
Expand Down Expand Up @@ -128,10 +132,10 @@ a.git-hash-text {
.task-description.unavailable .task-text {
font-style: italic;
}
.task-item.hidden-task {
display: none !important;
.task-title {
font-weight: 600;
}
.hide-task-btn, .notification-toggle-btn {
.task-ctrl-btn {
background: none;
border: none;
color: var(--text-muted);
Expand All @@ -144,11 +148,13 @@ a.git-hash-text {
justify-content: center;
flex-shrink: 0;
}
.hide-task-btn svg, .notification-toggle-btn svg {
.task-ctrl-btn svg {
width: 1rem;
height: 1rem;
}
.hide-task-btn:hover, .notification-toggle-btn:hover { opacity: 1; }
.task-ctrl-btn:hover {
opacity: 1;
}
.notification-toggle-btn.active {
color: var(--notification-btn-active-color);
opacity: 1;
Expand Down Expand Up @@ -179,18 +185,19 @@ a.git-hash-text {
color: var(--baro-timer-color);
margin-left: 0.4rem;
display: inline-block;
font-variant-numeric: tabular-nums;
}


/* --- Interactive Elements (Using Variables) --- */
input[type="checkbox"] {
appearance: none; -webkit-appearance: none; -moz-appearance: none;
width: 1.25rem; height: 1.25rem;
margin: 0.125rem 0;
width: 1.25rem;
height: 1.25rem;
margin: 0.125rem 0.5rem 0.125rem 0;
border: 2px solid var(--checkbox-border);
border-radius: 0.25rem; cursor: pointer;
position: relative;
margin-right: 0.5rem;
transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
background-color: var(--checkbox-bg);
flex-shrink: 0;
Expand Down Expand Up @@ -219,12 +226,12 @@ input[type="checkbox"]:indeterminate::after {
content: "\1F512\FE0E"; /* LOCK + VARIATION SELECTOR-15 (text presentation) */
color: var(--checkbox-lock-color);
}
li.task-item {
.task-item {
display: flex;
align-items: start;
margin-bottom: 0.5rem;
}
li.parent-task-container {
.parent-task-container {
display: flex;
flex-direction: column;
align-items: stretch;
Expand Down Expand Up @@ -296,17 +303,22 @@ li.parent-task-container {
opacity: 1;
color: var(--menu-close-btn-hover-color);
}
#options-menu .menu-btn {
#options-menu :is(.menu-btn, .menu-item) {
font-weight: 600;
display: block;
width: 100%;
text-align: left;
margin-top: 0;
margin-right: 0;
margin-bottom: 0.75rem;
}
#options-menu .menu-btn:last-child {
#options-menu :is(.menu-btn, .menu-item):last-child {
margin-bottom: 0;
}
#options-menu .checkbox-option {
display: flex;
align-items: start;
}

/* Dialogs */
dialog {
Expand All @@ -318,6 +330,12 @@ dialog::backdrop {
backdrop-filter: var(--backdrop-filter);
}

dialog hr {
border: none;
border-top: 1px solid var(--menu-panel-border);
margin: 1rem 0;
}

@media (prefers-reduced-motion: no-preference) {
dialog {
--dialog-anim-duration: 0.15s;
Expand Down Expand Up @@ -377,8 +395,9 @@ body:not(.light-mode) img.icon-filter {
margin: 0;
}

/* Collapsible Extra Task Info */
.task-info-expander {
/* Collapsible Stuff */
.task-info-expander,
.task-expander {
display: grid;
grid-template-rows: 1fr;
overflow: hidden;
Expand All @@ -389,7 +408,8 @@ body:not(.light-mode) img.icon-filter {
.task-item .checked .task-info-expander {
grid-template-rows: 0fr;
}
.task-info-expander > div {
.task-info-expander > div,
.task-expander > div {
min-height: 0;
}

Expand Down Expand Up @@ -523,3 +543,165 @@ body:not(.light-mode) img.icon-filter {
text-decoration: underline dotted;
cursor: pointer;
}

/* Hidden task animation */
.task-expander:has(> .task-item.hidden-task) {
grid-template-rows: 0fr;
}
.task-expander > .task-item.hidden-task {
margin: 0;
}
@media (prefers-reduced-motion: no-preference) {
.task-expander {
transition: grid-template-rows 200ms;
}
.task-expander > .task-item {
transition: margin 200ms;
}
}

/* Hide completed tasks */
body.hide-completed-tasks .task-expander:has(> .task-item > .checked),
body.hide-completed-tasks .task-expander:has(> .parent-task-container > .parent-task-header > .checked) {
grid-template-rows: 0fr;
@media (prefers-reduced-motion: no-preference) {
transition: grid-template-rows 200ms 5s;
}
@media (prefers-reduced-motion: reduce) {
transition: grid-template-rows 0s 5s;
}

&::after {
background-color: color(from var(--checkbox-checked-bg) srgb r g b / 0.25);
width: 0;
}
}
body.hide-completed-tasks .task-expander > .task-item:has(> .checked) {
margin: 0;
@media (prefers-reduced-motion: no-preference) {
transition: margin 200ms 5s;
}
@media (prefers-reduced-motion: reduce) {
transition: margin 0s 5s;
}
}
/* countdown bar */
.task-expander {
position: relative;
}
.task-expander::after {
position: absolute;
top: 0.125rem;
left: 1.75rem;
width: 100%;
height: 0.25rem;
border-radius: 0.125rem;
background-color: transparent;
content: "";
z-index: -1;
transition: width 5s linear;
}

/* List stats */
.list-stats {
color: var(--text-secondary);
font-size: 85%;
display: grid;
grid-template-rows: 0fr;
}
.list-stats > div {
overflow: hidden;
display: flex;
}
body.hide-completed-tasks .list-stats:has(> div > button[data-count]:not([data-count="0"])), /* with autohide, show when any stat is nonzero */
body:not(.hide-completed-tasks) .list-stats:has(> div > button:not(.stats-completed)[data-count]:not([data-count="0"])) /* without autohide, show when any stat except completed is nonzero */ {
grid-template-rows: 1fr;
}
@media (prefers-reduced-motion: no-preference) {
.list-stats { transition: grid-template-rows 200ms; }
}
.list-stats > div {
margin-bottom: 0.5em;
}
.list-stats > div > button[data-count="0"], /* hide stat when equal to 0 */
body:not(.hide-completed-tasks) .list-stats .stats-completed /* hide completed when autohide is off */ {
display: none;
}
.list-stats button {
border: 1px solid var(--theme-toggle-border);
border-radius: 0.375rem;
padding: 0 0.375em;
margin-right: 1em;
display: flex;
align-items: center;
transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
&:hover {
background-color: var(--theme-toggle-hover-bg);
border-color: var(--theme-toggle-hover-border);
color: var(--text-label);
}
svg {
margin-bottom: 0.1em;
margin-right: 0.25em;
width: 1em;
height: 1em;
}
}

.incomplete-count {
font-size: 65%;
font-weight: 600;
background-color: var(--text-header);
color: var(--bg-content);
border-radius: 1em;
display: grid;
padding: 0;
margin: 0;
grid-template-columns: 0fr;
transform: scale(0, 0);
opacity: 0;
overflow: hidden;
white-space: nowrap;
& > div {
min-width: 0;
}
.parent-task-header[aria-expanded="false"] &:not([data-count="0"]) {
grid-template-columns: 1fr;
transform: scale(1, 1);
opacity: 1;
padding: 0 0.4em;
margin-left: 0.25em;
}
@media (prefers-reduced-motion: no-preference) {
transition:
grid-template-columns 0.2s ease,
transform 0.2s ease,
opacity 0.2s ease,
padding 0.2s ease,
margin 0.2s ease;
}
}

#hidden-tasklist {
ul {
list-style: none;
padding: 0;
}
ul button {
width: 1.25rem;
height: 1.25rem;
margin: 0.125rem 0.5rem 0.125rem 0;
border: 0;
color: var(--text-muted);
transition: color 0.2s ease;
&:hover {
color: var(--text-secondary);
}
}
.task-title {
cursor: default;
}
ul.skipped button svg {
transform: scale(-1, 1);
}
}
Loading