Replace style-*.css with media queries
Libadwaita 1.9 deprecates using style-dark.css, style-hc-dark.css and style-hc.css. This moves these styles into style.css and conditionally loads them using media queries. Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/745>
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
/*
|
||||
* Search
|
||||
*/
|
||||
|
||||
searchbutton > popover listview > row:selected {
|
||||
background-color: rgb(from var(--accent-bg-color) r g b / 20%);
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
datechooser .weeknum {
|
||||
--border-width: 1px;
|
||||
--base-color: var(--window-fg-color);
|
||||
}
|
||||
|
||||
calendar-view.month-view {
|
||||
--raised-shade-color: var(--border-color);
|
||||
--raised-shade-color-base: transparent;
|
||||
}
|
||||
@@ -142,6 +142,13 @@ datechooser .weeknum {
|
||||
background-color: rgb(from var(--base-color) r g b / 5%);
|
||||
color: var(--base-color);
|
||||
}
|
||||
/* high contrast */
|
||||
@media (prefers-contrast: more) {
|
||||
datechooser .weeknum {
|
||||
--border-width: 1px;
|
||||
--base-color: var(--window-fg-color);
|
||||
}
|
||||
}
|
||||
|
||||
/* day names */
|
||||
datechooser .weekday {
|
||||
@@ -377,6 +384,13 @@ calendar-view.month-view {
|
||||
inset 0 -1px var(--raised-shade-color, var(--raised-shade-color-base)),
|
||||
inset 0 -2px 4px var(--raised-shade-color-base);
|
||||
}
|
||||
/* high contrast */
|
||||
@media (prefers-contrast: more) {
|
||||
calendar-view.month-view {
|
||||
--raised-shade-color: var(--border-color);
|
||||
--raised-shade-color-base: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
calendar-view.month-view > box.month-header {
|
||||
padding-bottom: 6px;
|
||||
@@ -443,6 +457,12 @@ searchbutton > popover > arrow {
|
||||
searchbutton > popover listview > row:selected {
|
||||
background-color: rgb(from var(--accent-bg-color) r g b / 11%);
|
||||
}
|
||||
/* dark mode */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
searchbutton > popover listview > row:selected {
|
||||
background-color: rgb(from var(--accent-bg-color) r g b / 20%);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Month selector
|
||||
|
||||
@@ -3,8 +3,5 @@
|
||||
<gresource prefix="/org/gnome/calendar">
|
||||
<file>events.css</file>
|
||||
<file>style.css</file>
|
||||
<file>style-dark.css</file>
|
||||
<file>style-hc.css</file>
|
||||
<file>style-hc-dark.css</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
|
||||
Reference in New Issue
Block a user