Skip to content

Commit

Permalink
externalize link foreground color color
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed Aug 31, 2016
1 parent 72b38ef commit a3e2cac
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ interface ThemeGlobalSettings {
referenceHighlight?: string;

activeLinkForeground?: string;
gotoDefinitionLinkForeground?: string;
}

class Theme {
Expand Down Expand Up @@ -230,7 +231,10 @@ class EditorLinkStyleRules extends EditorStyleRules {
public getCssRules(theme: Theme): string[] {
let cssRules = [];
if (theme.getGlobalSettings().activeLinkForeground) {
cssRules.push(`.monaco-editor.${theme.getSelector()} .detected-link-active { color: ${theme.getGlobalSettings().activeLinkForeground} !important; }`);
cssRules.push(`.monaco-editor.${theme.getSelector()} .detected-link-active { color: ${new Color(theme.getGlobalSettings().activeLinkForeground)} !important; }`);
}
if (theme.getGlobalSettings().gotoDefinitionLinkForeground) {
cssRules.push(`.monaco-editor.${theme.getSelector()} .goto-definition-link { color: ${new Color(theme.getGlobalSettings().gotoDefinitionLinkForeground)} !important; }`);
}
return cssRules;
}
Expand Down

0 comments on commit a3e2cac

Please sign in to comment.