The dark blue cursor is very hard to see in dark mode.
AI-generated summary
The discussion revolves around the visibility of the cursor in dark mode on Discourse, particularly on iOS devices. JohnAtl reports that the dark blue cursor is hard to see on an iPad Pro running iOS 12.2 with various browsers. Stephen requests more details and shares that the cursor appears white on macOS with Chrome and Safari. awesomerobot suggests using caret-color: currentColor; to match the text color, noting that browsers like Safari on iOS don’t handle it well. awesomerobot implements the change, ensuring the cursor matches text color across themes, while acknowledging potential visibility issues on iOS. JohnAtl thanks the developer for the fix.
Can you share a screenshot and give more info on browser and platform?
From my testing on Chrome (73) and Safari (12.1) on MacOS (10.14.4) it’s white.
iPad Pro 10.5"
iOS 12.2 (16E227)
Brave Version 1.9.1 (19.04.02.12)
Safari
Firefox Focus 8.1.2
I also looked at different Discourse sites (this one, talk.macpowerusers.com).
The screenshot below is from this site.
Thanks
@awesomerobot is that something we should control (via caret-color) or leave to the browsers?
Seems worth adding since it looks like browsers aren’t doing a great job at it (looks like Safari on iOS always uses blue no matter what the background color is?).
If we do caret-color: currentColor; it would match the text color of the input, which would also make things easier.
Edit… now that I think about it for a minute, this would make the caret a little less obvious on iOS because it would be black and not blue (for the default theme anyway). Maybe we should only set it on dark themes… ![]()
The Ghost theme’s yellow cursor is sufficiently different from the white text that it’s a little more obvious.
Made an update that sets the caret color to match the text color.
https://github.com/discourse/discourse/commit/54db23e4fff759e716f56d4f9582e22652a66763
I was considering having an exception for light themes on iOS, but that seemed like a very narrow exception and there are cases where you could have a blue background with a blue iOS caret… so it seems like it would be better to consistently match the text color everywhere…
I wonder if Apple will have a better cursor color for dark mode in iOS 13? ![]()
You can override this in a theme with the following CSS:
input,
select,
textarea {
caret-color: /* your color here */;
}
Thanks Kris!
…
