Skip to content
This repository has been archived by the owner on Sep 7, 2018. It is now read-only.

TypeScript separator background colour unusually dark, and lacks contrast with text #38

Closed
timswalling opened this issue Oct 11, 2017 · 5 comments

Comments

@timswalling
Copy link

timswalling commented Oct 11, 2017

Description

The background colour of the key/value separator is unusually dark in TypeScript files, and is almost the same colour as the text colour.

Steps to Reproduce

  1. Create a file called test.js
  2. Add the following content:
const foo = {
  bar: true
};
  1. Rename the file to test.ts

Expected behavior:

There will be little or no change in the text/background colour contrast for the colon that separates the key (bar) from the value (true).

Actual behavior:

The background colour changes from transparent to #373b41, while the text colour changes from #0184bc to #383a42. This is a change in contrast ratio from 4:1 to 1.01:1.

Reproduces how often:

This was reproduced in 100% of my tests.

Versions

Atom : 1.21.0
Electron: 1.6.9
Chrome : 56.0.2924.87
Node : 7.4.0

apm 1.18.5
npm 3.10.10
node 6.9.5 x64
python 2.7.10
git 2.4.1

Additional Information

This appears to be caused by the .syntax--meta.syntax--separator background colour, which is a fixed hex value.

@timswalling
Copy link
Author

Also: thank you to all the contributors, especially @simurai, for their work on this!

@jminuscula
Copy link

This has also started happening to me with a recent update

@smsalisbury
Copy link

smsalisbury commented Oct 17, 2017

Until this is fixed, you can add this to your global stylesheet to make the background color transparent:

.syntax--ts {
  .syntax--meta {
    &.syntax--separator {
      background-color: rgba(0, 0, 0, 0);
    }
  }
}

@rsese
Copy link

rsese commented Oct 30, 2017

Thanks for the report! I can reproduce on macOS 10.12.6 with Atom 1.23.0-dev-9a953726.

separator

/cc @simurai for when you're back ✌️

@simurai
Copy link
Contributor

simurai commented Dec 4, 2017

Looks like that background mistakenly got added when converting from a base16 theme 3 years ago, but didn't get noticed until TypeScript started to use that .syntax--separator scope. 😬

Anyways, let's 🔥 remove it. @timswalling thanks for the issue. 🙇

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

No branches or pull requests

5 participants