Skip to content

Commit b53a21e

Browse files
Merge pull request #28 from mauroreisvieira/fix/24-find-and-replace-inputs-look-broken
fix: generate hidden theme
2 parents 6ba019e + f94364f commit b53a21e

File tree

6 files changed

+1472
-1391
lines changed

6 files changed

+1472
-1391
lines changed

GitHub Light Colorblind.sublime-theme

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
"variables": {
44
"accent": "#0969da",
55
"background": "var(--background)",
6-
"foreground": "#1f2328",
6+
"foreground": "#24292f",
77
"fontSizeSm": 11,
88
"fontSizeMd": 12,
99
"fontSizeLg": 14,
1010
"fontSizeHuge": 24,
1111
"fontFace": "system",
1212
"titleBarBackground": "#ffffff",
13-
"titleBarForeground": "#656d76",
13+
"titleBarForeground": "#57606a",
1414
"tooltipBackground": "#0550ae",
1515
"tooltipForeground": "#b6e3ff",
1616
"sidebarLabelFontSize": 13,
@@ -20,67 +20,67 @@
2020
],
2121
"sidebarBackground": "#f6f8fa",
2222
"sidebarBorder": "#d0d7de",
23-
"sidebarHeadingForeground": "#1f2328",
24-
"sidebarLabelForeground": "#1f2328",
25-
"sidebarLabelHoverForeground": "#1f2328",
26-
"sidebarLabelSelectedForeground": "#1f2328",
27-
"sidebarFolderForeground": "#656d76",
23+
"sidebarHeadingForeground": "#24292f",
24+
"sidebarLabelForeground": "#24292f",
25+
"sidebarLabelHoverForeground": "#24292f",
26+
"sidebarLabelSelectedForeground": "#24292f",
27+
"sidebarFolderForeground": "#57606a",
2828
"sidebarFolderExpandedForeground": "var(accent)",
2929
"treeActiveSelectionBackground": "#e2e5e9",
3030
"tabBold": false,
3131
"tabLabelFontSize": 12,
3232
"tabInactiveBackground": "#f6f8fa",
3333
"tabBorder": "#d0d7de",
34-
"tabActiveForeground": "#1f2328",
34+
"tabActiveForeground": "#24292f",
3535
"tabActiveBackground": "#ffffff",
3636
"tabSelectedBorderBorder": "#fd8c73",
37-
"tabButtonForeground": "#1f2328",
37+
"tabButtonForeground": "#24292f",
3838
"gridBorder": "#d0d7de",
3939
"overlayBorder": "#ffffff",
4040
"overlayControlBorder": "#d0d7de",
4141
"panelControlBackground": "#f6f8fa",
42-
"panelControlForeground": "#1f2328",
42+
"panelControlForeground": "#24292f",
4343
"panelControlBorder": "#d0d7de",
4444
"panelRowBackground": "#f6f8fa",
45-
"panelRowForeground": "#1f2328",
46-
"panelRowLabelForeground": "#1f2328",
45+
"panelRowForeground": "#24292f",
46+
"panelRowLabelForeground": "#24292f",
4747
"panelRowSelectedBackground": "rgba(175,184,193,0.2)",
48-
"panelRowSelectedForeground": "#1f2328",
48+
"panelRowSelectedForeground": "#24292f",
4949
"panelRowMatchForeground": "#0969da",
5050
"panelRowSelectedMatchForeground": "#0969da",
5151
"panelRowLinkForeground": "#0969da",
5252
"autoCompleteBackground": "#f6f8fa",
53-
"autoCompleteForeground": "#1f2328",
53+
"autoCompleteForeground": "#24292f",
5454
"autoCompleteSelectedBackground": "#0366d625",
55-
"autoCompleteSelectedForeground": "#1f2328",
55+
"autoCompleteSelectedForeground": "#24292f",
5656
"autoCompleteMatchForeground": "var(accent)",
5757
"autoCompleteSelectedMatchForeground": "var(accent)",
5858
"inputBackground": "#f6f8fa",
5959
"inputBorder": "#d0d7de",
60-
"inputForeground": "#1f2328",
61-
"buttonForeground": "#1f2328",
62-
"buttonBackground": "color(#1f2328 alpha(0.02))",
60+
"inputForeground": "#24292f",
61+
"buttonForeground": "#24292f",
62+
"buttonBackground": "color(#24292f alpha(0.02))",
6363
"buttonBorder": "#d0d7de",
64-
"buttonHoverBackground": "color(#1f2328 alpha(0.1))",
65-
"buttonPressedBackground": "color(#1f2328 alpha(0.2))",
66-
"buttonSelectedBackground": "color(#1f2328 alpha(0.08))",
64+
"buttonHoverBackground": "color(#24292f alpha(0.1))",
65+
"buttonPressedBackground": "color(#24292f alpha(0.2))",
66+
"buttonSelectedBackground": "color(#24292f alpha(0.08))",
6767
"buttonIconForeground": "var(foreground)",
6868
"buttonIconSelectedForeground": "var(accent)",
69-
"statusBarForeground": "#656d76",
70-
"statusBarHoverForeground": "#1f2328",
69+
"statusBarForeground": "#57606a",
70+
"statusBarHoverForeground": "#24292f",
7171
"statusBarBackground": "#ffffff",
7272
"statusBarBorder": "#d0d7de",
7373
"progressBarBackground": "#218bff",
7474
"scrollBar": "#959da533",
7575
"scrollTrack": "#959da588",
7676
"vcsAnnotationBorder": "#d0d7de",
77-
"vcsUntracked": "#1a7f37",
77+
"vcsUntracked": "#0969da",
7878
"vcsModified": "#9a6700",
79-
"vcsDeleted": "#cf222e",
79+
"vcsDeleted": "#b35900",
8080
"vcsIgnored": "#6e7781",
81-
"vcsUnmerged": "#bc4c00",
81+
"vcsUnmerged": "#b35900",
8282
"vcsStaged": "#bf8700",
83-
"vcsMissing": "#bc4c00"
83+
"vcsMissing": "#b35900"
8484
},
8585
"rules": []
8686
}

Github.hidden-theme

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,10 +1015,7 @@
10151015
"layer1.inner_margin": 1,
10161016
"layer1.tint": "var(panelControlBorder)",
10171017
"layer1.opacity": 1,
1018-
"content_margin": [
1019-
12,
1020-
12
1021-
]
1018+
"content_margin": 1
10221019
},
10231020
{
10241021
"class": "panel_control",
@@ -1043,18 +1040,15 @@
10431040
{
10441041
"class": "text_line_control",
10451042
"layer0.opacity": 1,
1046-
"layer0.inner_margin": [
1047-
12,
1048-
0
1049-
],
1043+
"layer0.inner_margin": 1,
10501044
"layer0.tint": "var(background)",
10511045
"layer1.tint": "var(inputBorder)",
10521046
"layer1.opacity": 1,
10531047
"layer1.inner_margin": 1,
10541048
"layer1.draw_center": false,
10551049
"content_margin": [
10561050
8,
1057-
6
1051+
12
10581052
],
10591053
"color_scheme_tint": "var(background)"
10601054
},

src/index.ts

Lines changed: 7 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,21 @@
1-
import { getScheme } from './scheme';
2-
import { generateTheme, getTheme } from './theme';
1+
import { schemes } from './scheme';
32
import { generateScheme } from '@meetio/scheme-generator';
4-
// Types
5-
import { Scheme, Theme } from './interfaces';
3+
import { generateTheme, themes } from './theme';
64

7-
[
8-
{
9-
name: 'GitHub Dark',
10-
author: 'Mauro Reis Vieira <[email protected]>',
11-
variables: getScheme('dark'),
12-
},
13-
{
14-
name: 'GitHub Dark High Contrast',
15-
author: 'Mauro Reis Vieira <[email protected]>',
16-
variables: getScheme('dark_high_contrast'),
17-
},
18-
{
19-
name: 'GitHub Dark Colorblind',
20-
author: 'Mauro Reis Vieira <[email protected]>',
21-
variables: getScheme('dark_colorblind'),
22-
},
23-
{
24-
name: 'GitHub Light',
25-
author: 'Mauro Reis Vieira <[email protected]>',
26-
variables: getScheme('light'),
27-
},
28-
{
29-
name: 'GitHub Light High Contrast',
30-
author: 'Mauro Reis Vieira <[email protected]>',
31-
variables: getScheme('light_high_contrast'),
32-
},
33-
{
34-
name: 'GitHub Light Colorblind',
35-
author: 'Mauro Reis Vieira <[email protected]>',
36-
variables: getScheme('light_colorblind'),
37-
},
38-
{
39-
name: 'GitHub Dimmed',
40-
author: 'Mauro Reis Vieira <[email protected]>',
41-
variables: getScheme('dimmed'),
42-
},
43-
].map((scheme: Scheme) => {
44-
const { colors, rules, ui } = scheme.variables;
5+
schemes.map((scheme) => {
456
generateScheme({
467
name: scheme.name,
478
author: scheme.author,
489
output: {
4910
filename: scheme.name,
5011
},
51-
settings: {
52-
colors,
53-
ui,
54-
rules,
55-
},
12+
settings: scheme.variables,
5613
});
5714
});
5815

59-
[
60-
{
61-
name: 'GitHub Dark',
62-
settings: getTheme('dark'),
63-
},
64-
{
65-
name: 'GitHub Dark High Contrast',
66-
settings: getTheme('dark_high_contrast'),
67-
},
68-
{
69-
name: 'GitHub Dark Colorblind',
70-
settings: getTheme('dark_colorblind'),
71-
},
72-
{
73-
name: 'GitHub Light',
74-
settings: getTheme('light'),
75-
},
76-
{
77-
name: 'GitHub Light High Contrast',
78-
settings: getTheme('light_high_contrast'),
79-
},
80-
{
81-
name: 'GitHub Light Colorblind',
82-
settings: getTheme('light'),
83-
},
84-
{
85-
name: 'GitHub Dimmed',
86-
settings: getTheme('dimmed'),
87-
},
88-
{
89-
name: 'GitHub Adaptive',
90-
settings: getTheme('adaptive'),
91-
},
92-
].map((theme: Theme) => {
16+
themes.map(({ output, settings }) => {
9317
generateTheme({
94-
output: {
95-
filename: theme.name,
96-
},
97-
settings: theme.settings,
18+
output,
19+
settings,
9820
});
9921
});

src/interfaces.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,10 @@ export interface ThemeVariables {
3030

3131
export interface ThemeSetting {
3232
extends?: string;
33-
variables: ThemeVariables;
33+
variables?: ThemeVariables;
3434
rules?: any;
3535
}
3636

37-
export interface Theme {
38-
name: string;
39-
settings: ThemeSetting;
40-
}
41-
4237
export interface GenerateTheme {
4338
/** Settings of scheme */
4439
settings: ThemeSetting;

src/scheme.ts

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import chroma from 'chroma-js';
22
import { getColors } from './colors';
33
// Types
4-
import type { Options, Primer } from './interfaces';
4+
import type { Options, Primer, Scheme } from './interfaces';
55
import type { Colors, Rules, UI } from '@meetio/scheme-generator/dist/types';
66

77
export function setColors(theme: Primer): Colors {
@@ -823,3 +823,41 @@ export function getScheme(theme: Primer) {
823823
rules: setRules(theme),
824824
};
825825
}
826+
827+
export const schemes: Scheme[] = [
828+
{
829+
name: 'GitHub Dark',
830+
author: 'Mauro Reis Vieira <[email protected]>',
831+
variables: getScheme('dark'),
832+
},
833+
{
834+
name: 'GitHub Dark High Contrast',
835+
author: 'Mauro Reis Vieira <[email protected]>',
836+
variables: getScheme('dark_high_contrast'),
837+
},
838+
{
839+
name: 'GitHub Dark Colorblind',
840+
author: 'Mauro Reis Vieira <[email protected]>',
841+
variables: getScheme('dark_colorblind'),
842+
},
843+
{
844+
name: 'GitHub Light',
845+
author: 'Mauro Reis Vieira <[email protected]>',
846+
variables: getScheme('light'),
847+
},
848+
{
849+
name: 'GitHub Light High Contrast',
850+
author: 'Mauro Reis Vieira <[email protected]>',
851+
variables: getScheme('light_high_contrast'),
852+
},
853+
{
854+
name: 'GitHub Light Colorblind',
855+
author: 'Mauro Reis Vieira <[email protected]>',
856+
variables: getScheme('light_colorblind'),
857+
},
858+
{
859+
name: 'GitHub Dimmed',
860+
author: 'Mauro Reis Vieira <[email protected]>',
861+
variables: getScheme('dimmed'),
862+
},
863+
];

0 commit comments

Comments
 (0)