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

Comment Color Brightness #61

Merged
merged 2 commits into from
May 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions index.less
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,3 @@
@import "styles/languages/shell";
@import "styles/languages/yaml";
@import "styles/languages/xml";

/*+----------------+
+ Theme Settings +
+----------------+*/
@import "styles/syntax-theme-settings";
@import "styles/theme-settings-store";
17 changes: 0 additions & 17 deletions lib/constants.js

This file was deleted.

22 changes: 12 additions & 10 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,18 @@
* License: MIT
*/

import fs from "fs";
import { toggleClass } from "./utils";

export default {
writeConfig(options) {
handleDeprecatedCustomCommentContrastSetting(options) {
let customCommentContrast = atom.config.get("nord-atom-syntax.accessibility.commentContrast");
let config = `@theme-setting-accessibility-custom-comment-contrast: ${customCommentContrast}%;\n`;
if (customCommentContrast != 0) {
atom.notifications.addWarning(`The "Custom Comment Contrast" theme setting is deprecated and will be removed in version 1.0.0!`, {
detail: "To adapt to the change reset the setting to the default value by deleting the user-defined value from the text field or setting the value to 0.",
description: `The comment color brightness has been increased by 10% by default!
As of version 0.4.0, the setting has no effect anymore. Please see [arcticicestudio/nord-atom-syntax#60](https://github.com/arcticicestudio/nord-atom-syntax/issues/60) for more details.`,
dismissable: true,
icon: "megaphone"
});

fs.writeFile(`${__dirname}/../styles/theme-settings-store.less`, config, "utf8", () => {
if (!options || !options.noReload) {
let themePack = atom.packages.getLoadedPackage("nord-atom-syntax");

Expand All @@ -28,12 +31,11 @@ export default {
}
if (options && options.callback && typeof options.callback === "function") {
options.callback();
}
});
};
}
},

activate() {
toggleClass(true, "theme-nord-atom-syntax-accessibility-custom-comment-contrast");
atom.config.onDidChange("nord-atom-syntax.accessibility.commentContrast", () =>this.writeConfig({ noReload: true }));
atom.config.onDidChange("nord-atom-syntax.accessibility.commentContrast", () => this.handleDeprecatedCustomCommentContrastSetting({ noReload: true }));
}
};
23 changes: 0 additions & 23 deletions lib/utils.js

This file was deleted.

10 changes: 10 additions & 0 deletions styles/colors.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* Copyright (C) 2016-present Arctic Ice Studio <[email protected]>
* Copyright (C) 2016-present Sven Greb <[email protected]>
*
* Project: Nord Atom Syntax
* Repository: https://github.com/arcticicestudio/nord-atom-syntax
* License: MIT
*/

@nord3-brightened: #616E88;
28 changes: 0 additions & 28 deletions styles/syntax-theme-settings.less

This file was deleted.

3 changes: 2 additions & 1 deletion styles/syntax-variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
+ Imports +
+---------+*/
@import "nord";
@import "colors";

/*+------------+
+ Animations +
Expand Down Expand Up @@ -62,7 +63,7 @@
@syntax-color-attribute: @nord7;
@syntax-color-attribute-id: @nord7;
@syntax-color-class: @nord7;
@syntax-color-comment: @nord3;
@syntax-color-comment: @nord3-brightened;
@syntax-color-constant: @nord7;
@syntax-color-embedded: @nord9;
@syntax-color-escape: @nord12;
Expand Down
1 change: 0 additions & 1 deletion styles/theme-settings-store.less

This file was deleted.