To anyone who knows CSS better than I do (meaning almost anyone ...)
I have been using below userchrome.css file for a long time, it simply did exactly what I wanted it to do.
When I updated to the latest production V a few days ago, my notes list turned into a list with huge line spacing and a much too small font. I suppose some entry is missing, which didn't matter before and all of a sudden does.
Could anyone tell me what went wrong and how to fix it ?
v.2.13.1 has a release note saying, "Improved: Refactor note list in preparation for plugin support" and so it appears that the css element/classes have changed.
To narrow the note list items and change the font you need to add something like:
I have found ways for changing most of the text and icons in the sidebar but the sync message text and the box around the sync button have beaten me...
This changes specific bits, one at a time. I divided it into three sections.
"Fixed" items such as titles and icons
"User" items such as the names of the actual notebooks and tags
The note count text
This does not cover the syncing text and the sync button itself.
It avoids "generated" classes that may change between builds.
The comments list what is changed in the order they appear in the css.
div.sidebar i.icon-notebooks,
div.sidebar div div button span.fa-plus,
div.sidebar i.icon-notes,
div.sidebar i.icon-tags,
div.sidebar div div span,
div.folders div div span {
/* sidebar - notebooks icon, notebooks plus sign, "All Notes" icon, tags icon, "NOTEBOOKS" and "TAGS" titles */
color: black;
}
div.sidebar a.list-item,
div.sidebar span.title,
div.sidebar span.tag-label {
/* sidebar - "All Notes" text, notebook & tag names text */
color: black;
}
div.sidebar div.note-count-label {
/* sidebar - number of notes shown after notebook & tag name text */
color: black;
}
The below alternative uses a rather brutal "I don't care what it is, turn it black" approach.
This does not cover the sync button border.
div.sidebar * {
color: black !important;
}
Hopefully these have been created so they affect the sidebar only and not other parts of Joplin.
There must be better ways to do this so I would invite anyone who knows how, to chip in...
Just a side note, but this is very, very bad in terms of performance. CSS reads from right to left, so the engine needs to literally go through all elements in the HTML while also checking whether one of their parents is div.sidebar.
This doesn't matter that much when the code is short and simple, however the HTML of Joplin is far from that, so I would be cautious .
Thanks for the excellent advice. I must be honest and say that I did not even consider what the engine would have to do when introducing a *. I was just determined to do anything to get the colour to change!!
There must be an easier way than this but the below seems to change everything to black. I have also included the background colour setting and a method of changing the colour of the selected notebook/tag.
This is my last post for this "challenge". For any other questions about this the answer is no!
div.sidebar {
/* sidebar - background colour */
background-color: cornsilk;
}
div.sidebar div.selected {
/* sidebar - background colour of the selected notebook or tag */
background-color: darkseagreen;
}
div.sidebar i.icon-notebooks,
div.sidebar div div button span.fa-plus,
div.sidebar i.icon-notes,
div.sidebar i.icon-tags,
div.sidebar div div span,
div.folders div div span {
/* sidebar - notebooks icon, notebooks plus sign, "All Notes" icon, tags icon, "NOTEBOOKS" and "TAGS" titles */
color: black;
}
div.sidebar a.list-item,
div.sidebar span.title,
div.sidebar span.tag-label {
/* sidebar - "All Notes" text, notebook & tag names text */
color: black;
}
div.sidebar div.note-count-label {
/* sidebar - number of notes shown after notebook & tag name text */
color: black;
}
div.sidebar div div,
div.sidebar div button,
div.sidebar div button span {
/* sidebar - sync info text, sync button, sync button icon and text*/
color: black !important;
border-color: black !important;
}