diff --git a/shaarli-pro/js/custom_views.js b/shaarli-pro/js/custom_views.js index a3ea2e3..9cc1a81 100644 --- a/shaarli-pro/js/custom_views.js +++ b/shaarli-pro/js/custom_views.js @@ -1823,15 +1823,21 @@ function applyNoteVisualState(element, note) { element.classList.add(`note-filter-${filter}`); } - if (colorValue) { + // For the "default" color we intentionally DO NOT set an inline + // background-color. That lets the CSS token --tile-bg (which follows + // the active theme's --header-bg) drive the tile color. A hard-coded + // inline style would win over the theme CSS (Shaarli pro theme bug). + if (colorValue && color !== "default") { element.style.backgroundColor = colorValue; element.style.removeProperty("border-color"); } else { element.style.removeProperty("background-color"); } - if (foregroundColor) { + if (foregroundColor && color !== "default") { element.style.setProperty("--note-card-fg", foregroundColor); + } else { + element.style.removeProperty("--note-card-fg"); } if (fontColor && fontColor !== "auto") {