Skip to content
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

#46 Theme Settings: Custom Comment Contrast #47

Merged

Conversation

arcticicestudio
Copy link
Contributor

@arcticicestudio arcticicestudio commented Apr 8, 2017

Bound to #46
/cc @ascarter @mattfysh @adrian5

This PR implements theme settings and various improvements to the build- and development workflow.
ghi-46-scrot-syntax-theme-settings

The initial implementation provides a setting to increase the contrast for comments by percentage.
ghi-46-scrot-syntax-theme-setting-custom-comment-contrast
ghi-46-scrot-comments-contrast-default
The default value is 0 which uses the default Nord color assignment while the maximum value is 20.

Example with an increased comment contrast value of 15 (%):
ghi-46-scrot-syntax-theme-setting-custom-comment-contrast-value
ghi-46-scrot-comments-contrast-customized

Unfortunately Atom does currently not support modifications of LESSCSS theme variables through configurations so a workaround has been implemented which stores LESSCSS variables in the index-imported styles/theme-settings-store.less file to override the default LESSCSS variables defined in the styles/syntax-variables.less file.
Please see atom/atom PR #4153 and atom/atom #5735 for more information about the current limitations.

@arcticicestudio
Copy link
Contributor Author

arcticicestudio commented Apr 9, 2017

Alright, I'll have to take care of the build errors at another time. Everything works fine on my local system (Arch Linux), but the builds on Travis Linux are failing with a JavaScript syntax error which can only be due to the Babel ES6 code (lambda function expression).
Curiously the Travis OSX builds are running fine without any error 😕

@ascarter
Copy link

+1. This works great. Accessibility percentage adjustments seem like a nice way to expose this. This worked well for me on my machine. Thanks!

@ascarter
Copy link

And FYI - I tested on my iMac and MacBook Pro both running latest Sierra and latest stable Atom.

@arcticicestudio
Copy link
Contributor Author

I finally fixed all Travis CI builds in all environments. The linux builds are unfortunately based on Ubuntu which only comes with the pre-installed (outdated) Node version 0.10.x.
The specs and Atom tests using a bundled Node runtime, but the gulp lint command uses the locally installed Node.
Now using nvm to install the necessary Node version Atom is bundled with and runs the gulp lint command before the actual script Atom CI script. Afterwards the nvm deactivate enures that the bundled Node version does not collide with the locally installed Node version.

Anyway, I'll merge this PR into develop and prepare a new APM package release.

@arcticicestudio arcticicestudio merged commit 935c2ae into develop Apr 14, 2017
@arcticicestudio arcticicestudio deleted the feature/ghi-#46-adjustments-for-color-blindness branch April 14, 2017 07:17
@arcticicestudio arcticicestudio added this to the 0.9.0 milestone Jul 8, 2017
arcticicestudio added a commit to nordtheme/emacs that referenced this pull request Sep 30, 2017
> Description

Added a accessibility theme customization to allow users to set the
brightness of comments with percentage adjustments from 0% - 20% where 0
is the default nord3 comment color. When a invalid value is
passed (< 0 || > 20 || nil) the default nord3 color is used.

The customization is available through the nord-comment-brightness variable.

This is a optional customization to provide a way for users to adjust
the color to fit their needs: It is a port of the reference
implementation from the Nord Atom UI project. The values are calculated
using the LESSCSS lighten function to ensure full interoperability with
other port projects that providing this theme feature.

> Usage

Example to increase the comment color brightness by 15%:
  (setq nord-comment-brightness 15)

References:
nordtheme/atom-syntax#47
http://lesscss.org/functions/#color-operations-lighten

GH-43
arcticicestudio added a commit to nordtheme/emacs that referenced this pull request Sep 30, 2017
> Description

Added a accessibility theme customization to allow users to set the
brightness of comments with percentage adjustments from 0% - 20% where 0
is the default nord3 comment color. When a invalid value is
passed (< 0 || > 20 || nil) the default nord3 color is used.

The customization is available through the nord-comment-brightness variable.

This is a optional customization to provide a way for users to adjust
the color to fit their needs: It is a port of the reference
implementation from the Nord Atom UI project. The values are calculated
using the LESSCSS lighten function to ensure full interoperability with
other port projects that providing this theme feature.

> Usage

Example to increase the comment color brightness by 15%:
  (setq nord-comment-brightness 15)

References:
nordtheme/atom-syntax#47
http://lesscss.org/functions/#color-operations-lighten

GH-43
arcticicestudio added a commit to nordtheme/emacs that referenced this pull request Sep 30, 2017
> Description

Added a accessibility theme customization to allow users to set the
brightness of comments with percentage adjustments from 0% - 20% where 0
is the default nord3 comment color. When a invalid value is
passed (< 0 || > 20 || nil) the default nord3 color is used.

The customization is available through the nord-comment-brightness variable.

This is a optional customization to provide a way for users to adjust
the color to fit their needs: It is a port of the reference
implementation from the Nord Atom UI project. The values are calculated
using the LESSCSS lighten function to ensure full interoperability with
other port projects that providing this theme feature.

> Usage

Example to increase the comment color brightness by 15%:
  (setq nord-comment-brightness 15)

References:
nordtheme/atom-syntax#47
http://lesscss.org/functions/#color-operations-lighten

GH-43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants