Skip to content
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.

Use native textarea when editing user rules #804

Merged
merged 1 commit into from
Nov 23, 2017

Conversation

Neui
Copy link
Contributor

@Neui Neui commented Oct 12, 2017

Use native textarea (no color set) when editing temporary user rules.
Improves visibility significantly when eg. using Firefox with a dark GTK theme.
Also, it is consistent with other text fields, as they're also drawn using the native colors.

Tested only using the "Inspect Element" feature in Firefox to change the CSS temporarily.

Before: Before

After: After

Use native textarea (no color set) when editing temporary user rules.
Improves visibility significantly when eg. using Firefox with a dark GTK theme.
@gorhill
Copy link
Owner

gorhill commented Nov 23, 2017

How does it look when not using a dark theme? I wanted to slightly distinguish the background to remind the user he is in edit mode. What if using an alpha channel for the background color, so that both dark and light theme can have that visual hint?

@gorhill
Copy link
Owner

gorhill commented Nov 23, 2017

I will import the changes for now as is because I can see it's really crippling for people using dark theme. I will eventually try to see if it's possible to offer a discrete visual hint which works with both dark and light theme.

@gorhill gorhill merged commit f2a2068 into gorhill:master Nov 23, 2017
@gorhill
Copy link
Owner

gorhill commented Nov 23, 2017

Thanks.

@Neui
Copy link
Contributor Author

Neui commented Nov 23, 2017

Another way this could be done is that both the background and text color are set explicitly. I didn't chose to do this because this was the only text field where it is partly explicitly set, so I took the easier route (this PR). Maybe every textareas and buttons could be set explicitly (via a global style) so it is more consistent with the background, and you can do the visual hint.

@gorhill
Copy link
Owner

gorhill commented Nov 23, 2017

I was thinking of using a translucent color (rgba with a = 0.1 or something like that) for the background color, so that the visual would work for any theme color.

@Neui
Copy link
Contributor Author

Neui commented Nov 23, 2017

So you mean something like this?

BG | Native <textarea> color | rgba(127, 127, 127, 0.1) | Real <textarea> with a=0 BG (| User)

It might work, but it would be somewhat harder to set up. Also it seems you need to set RGB explicitly before being allowed to set alpha, thus losing the native color. So I'd guess it would be easier to explicitly set both the background and text color for every textareas:

textarea { background: white; color: black }
#diff textarea { background: gray; }

You would use the native colors, but the site is bright anyway, so it would be more fitting.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants