-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: unifying syntax colors between CodeMirror and Reps #115
Comments
That sounds great and a lot more semantic than the current copy-pasta. Product-wise unifying the color palette should reduce the UI noise somewhat. |
cc @nchevobbe @violasong for input. |
User request: differentiating object keys and values |
Re: keys/values, on Discourse, I mentioned
Here's an example in the Network sidebar. The blue/pink pattern was borrowed from the Inspector CSS syntax coloring, which was inspired by the HTML coloring. I think it works fine in the HTML/CSS schemes, but in the case of long lists of key/values as seen in Network/Console, especially when the value strings are lengthy like in Network, the magenta gets tough to read because of how bright it is. Moving to blue/(black|white) would keep it more neutral-looking, while still providing high contrast between the keys/values. |
@jasonLaster @nchevobbe what do you think about less-purple reps styling?
One aspect from Discourse that isn't covered is that keys of child objects in an inspected object and not blue in Chrome but gray; which helps reducing the color bursts. It seems right now the work just focused on toning down the string values, correct? |
It looks like we currently have 2 color themes for code or code-like objects:
See #103 (comment) for a tiny bit of exploration. We also probably have some specific styles in Inspector (Markup, Rules) and a bunch of other places.
It leads to situations where strings can be dark blue (CodeMirror) or bright magenta (Reps), while we also use magenta for keywords like
function
,const
,return
etc. (CodeMirror).It might be interesting to harmonize the colors of CodeMirror and Reps.
And since we're not sure we'll keep CodeMirror in the future (e.g. if moving to Monaco), I suggest creating a CSS module that defines CSS variables for light/dark themes for different data/keyword types, and then match them to Reps and CodeMirror selectors.
So something like:
And I'd like retiring the variables defined by Reps, and the use for syntax coloring of
--theme-highlight-*
variables whose values have changed a lot over time (red is magenta, purple is blue, etc.):The text was updated successfully, but these errors were encountered: