Files
ricing/theme/templates/gtk3/gtk.css

74 lines
2.3 KiB
CSS
Raw Permalink Normal View History

/* Generated by theme/render.py from the active palette.
Edit the template at ~/.config/theme/templates/gtk3/gtk.css, not the output.
Blanket GTK3 override (applies to every GTK3 app: Thunar, Qalculate-gtk, etc.) - GSettings
(set in hyprland.lua's config.reloaded hook) picks the base Materia-dark theme, this then
forces the actual colors on top of it to match the palette.
No !important: GTK3's CSS parser doesn't support it at all (not "lower priority" -
it drops the whole declaration, "Junk at end of value" in GTK_DEBUG output). This file
is loaded at GTK_STYLE_PROVIDER_PRIORITY_USER, already above the theme's own CSS, so
plain declarations here win without it. */
* {
color: {foreground};
}
window, dialog, grid {
background-color: {background};
background-image: none;
}
entry, textview, textview text, text {
background-color: {background};
color: {accent};
border: 1px solid {accent};
border-radius: 6px;
box-shadow: none;
}
button {
background-color: {pill_color};
background-image: none;
border: 1px solid {color8};
border-radius: 6px;
box-shadow: none;
}
button:hover {
background-color: {color8};
border-color: {accent};
}
button label {
color: {foreground};
}
button:hover label {
color: {accent};
}
/* Thunar's grid is ExoIconView, an old custom widget that doesn't ask the style
context "what's my background for :selected" through normal CSS matching - it
looks up these named colors directly instead (gtk_style_context_lookup_color).
Redefining them is what actually recolors the selection there; .view:selected/
*:selected below do nothing for it, only for widgets that DO use normal matching. */
@define-color theme_selected_bg_color alpha({gtk_selection_color}, {gtk_selection_opacity});
@define-color theme_selected_fg_color {foreground};
@define-color theme_unfocused_selected_bg_color alpha({gtk_selection_color}, {gtk_selection_opacity});
@define-color theme_unfocused_selected_fg_color {foreground};
/* File-manager icon/list view (Thunar's grid, Materia's rounded selection pill) */
.view {
background-color: transparent;
color: {foreground};
}
.view:hover {
background-color: alpha({accent}, 0.18);
}
*:selected {
background-color: alpha({gtk_selection_color}, {gtk_selection_opacity});
color: {foreground};
}