[GNC] Color of register placeholder text and hiding register header

Adrien Monteleone adrien.monteleone at lusfiber.net
Mon Sep 12 17:18:03 EDT 2022


On 9/11/22 1:16 PM, Glenn Fowler wrote:
> I found this will change the input text color:
> 
> gnc-id-cursor entry {
>    color: green;
> }
> 
> ...and it works but it gets overridden whenever you change
> *.gnc-class-register-cursor color but not sure why.

Not sure either, maybe reverse them in the file? (this is Cascading 
Style Sheets after all) It could also be a specificity problem.

I have a rule for:

cursor entry {}

that might work if you target it with a color rule.

But without playing around with it, I'm not sure why I have it. (sadly, 
I did not document it)

GnuCash also has some defined color variables you can use. I have 
definitions for:

@define-color register_secondary_bg_color #d9d9d9;
@define-color register_cursor_bg_color #fefefe;

I don't know if there is a 'register_cursor_fg_color' or just 
'register_cursor_color' but one of those might be worth a shot.

> As for the header I'm not sure how you would completely remove that. I'm
> assuming that would be in the code and not just CSS.

You probably can't (I didn't try) but I'll hazard something like:

register-header {
  display: none;
}

is the first thing to try.

Of course, I'd fire up the Inspector and play with changes live to see 
what works, and then copy/paste those rules into my CSS file.

Regards,
Adrien




More information about the gnucash-user mailing list