I try to make a dark stylesheet based on the ReverseColor theme. However, dataset headers are barely readable.
This question is related to others such as Question 1 and Question 2. But no solution has been found yet.
It seems that the new options for Dataset called HeaderStyle/HeaderBackground introduced in Version 12.1 might help, since it is now possible to modify headers:
ds = Dataset[{<|"a" -> 1, "b" -> 3|>,<|"a" -> 2, "b" -> 4|>}, HeaderStyle -> White, HeaderBackground -> Black]
However, any small change in the dataset restores the default settings:
ds[All, ;; 2]
I tried to modify the default values of HeaderStyle (None) and HeaderBackground (Automatic) by typing:
SetOptions[Dataset,HeaderBackground->Black,HeaderStyle->White]
Typing Options[Dataset] indicates that it changes the default values of these options but
does not seem to apply since, for example, headers of:
Dataset[{<|"a"->3,"b"->4|>}]
and:
ds[All,;;2]
have the default format.
Any idea to modify the default layout of dataset headers from a stylesheet or at least for an entire notebook?







ds[2]removes the formatting.But can this $PrePrint solution be introduced in the stylesheet definition, with something like
– Vly Feb 13 '21 at 13:22Cell[StyleData["Dataset"], ...]?$PrePrintin every mma session is to add$PrePrint =...to theinit.mfile. – kglr Feb 13 '21 at 13:42$PrePrint=...line to the init.m file perfectly extends the bevahior to all the notebooks. Also, now, I know the use of this init.m file. Thank you again! – Vly Feb 13 '21 at 14:22