Skip to content

Commit 0e87703

Browse files
committed
style(calendar): optimize mini calendar layout for more compact design
Remove aspect-ratio constraint from calendar days and reduce spacing throughout the mini calendar component to achieve a more compact layout while maintaining visual clarity. Changes include: - Remove aspect-ratio: 1 from calendar days for better height control - Reduce grid gaps and padding values across calendar elements - Adjust header and day-header spacing for tighter layout - Update task count badge styling with smaller border radius - Set min-height using CSS variable for consistent sizing
1 parent 866aceb commit 0e87703

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

src/styles/calendar.css

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
display: flex;
1212
justify-content: space-between;
1313
align-items: center;
14-
padding: 10px 15px;
15-
margin-bottom: 10px;
14+
padding: 8px 15px;
15+
margin-bottom: 8px;
1616
}
1717

1818
.task-genius-view .mini-calendar-container .calendar-title {
@@ -69,17 +69,17 @@
6969
.task-genius-view .mini-calendar-container .calendar-grid {
7070
display: grid;
7171
grid-template-columns: repeat(7, 1fr);
72-
gap: 2px;
72+
gap: 1px;
7373
padding: 0 10px;
7474
}
7575

7676
.task-genius-view .mini-calendar-container .calendar-day-header {
7777
text-align: center;
7878
font-size: 0.8em;
7979
color: var(--text-muted);
80-
padding: 5px 0;
80+
padding: 3px 0;
8181
border-bottom: 1px solid var(--background-modifier-border);
82-
margin-bottom: 5px;
82+
margin-bottom: 3px;
8383
}
8484

8585
.task-genius-view
@@ -97,14 +97,15 @@
9797
so no hiding rules are needed. The grid layout adjustments above are sufficient. */
9898

9999
.task-genius-view .mini-calendar-container .calendar-day {
100-
aspect-ratio: 1;
101100
border-radius: 4px;
102-
padding: 2px;
101+
padding: 1px;
103102
cursor: pointer;
104103
position: relative;
105104
display: flex;
106105
flex-direction: column;
107106
transition: background-color 0.2s ease;
107+
height: auto;
108+
min-height: var(--size-4-12);
108109
}
109110

110111
.task-genius-view .mini-calendar-container .calendar-day:hover {
@@ -132,16 +133,16 @@
132133
text-align: center;
133134
font-size: 0.9em;
134135
font-weight: 500;
135-
padding: 2px;
136+
padding: 1px;
136137
}
137138

138139
.task-genius-view .mini-calendar-container .calendar-day-count {
139140
background-color: var(--background-modifier-border);
140141
color: var(--text-normal);
141-
border-radius: 10px;
142+
border-radius: 8px;
142143
font-size: 0.7em;
143-
padding: 1px 5px;
144-
margin: 2px auto;
144+
padding: 1px 4px;
145+
margin: 1px auto 0;
145146
text-align: center;
146147
width: fit-content;
147148
}

0 commit comments

Comments
 (0)