How to set background color of select html tag

609 views
Skip to first unread message

talha131

unread,
Jul 15, 2018, 11:05:38 AM7/15/18
to TiddlyWiki

JD suggested the solution to this issue. I am documenting it here for others who might face the same issue.

Problem

Color palette setting may make the text in dropdown list (<select>) invisible

Screen Shot 2018-07-15 at 00.05.08

To reproduce the issue, try Neonize or C8 Dark palette from here.

Solution

That’s because the select HTML tag’s background is not defined in the core themes. We need to style it separately, by adding this CSS to any tiddler tagged $:/tags/Stylesheet

select { background: <<colour page-background>>; }

Or if you want the tiddler background color:

select { background: <<colour background>>; }

Or if you want it to be transparent:

select { background: transparent; }

Thanks JD

JD

unread,
Jul 15, 2018, 11:13:24 AM7/15/18
to TiddlyWiki
Oh, thanks Talha! 

Maybe we can add this as an issue to TW5 on github? So somebody at the dev team can add any of those three lines to the core Vanilla theme.

(I'm intimidated by the large number of issues still open there to open a new one myself)

-JD

TonyM

unread,
Jul 15, 2018, 8:33:37 PM7/15/18
to TiddlyWiki
JD,

The number of issues seems to hover around 600 so they are being addressed, I think if you can define well a problem, and know a solution and can facilitate by adding more info they may be more likely to be addressed.

I have also noticed some of the issues raised individually end up being included in a future release but the issue is not referred back to and closed. 

Keep in mind that their may be other considerations that influence if an issue is resolved, It appears that batches of issues may be resolved when a new core facility is introduced.

Don't be shy,

Tony

talha131

unread,
Jul 16, 2018, 11:59:22 AM7/16/18
to TiddlyWiki

I have fixed the issue to the best of my knowledge and opened up a pull request at Github

https://github.com/Jermolene/TiddlyWiki5/pull/3360

AdamS

unread,
Nov 2, 2018, 7:52:28 AM11/2/18
to TiddlyWiki
I've tried to implement the solution, and I think I've done it correctly. What I'm getting is the select tags look great until you click on it and try to select one of the options. The dropdown menu turns white (against white text). I'm not sure if I'm doing something wrong or if the solution is incomplete.

Best regards,

Adam

AdamS

unread,
Nov 2, 2018, 1:26:38 PM11/2/18
to TiddlyWiki
Nope. I'm wrong. Works great! I had another stylesheet running that was causing me problems. Thanks for the fix!


On Monday, July 16, 2018 at 4:59:22 PM UTC+1, talha131 wrote:
Reply all
Reply to author
Forward
0 new messages