Skip to content

Commit 14614b0

Browse files
committed
Move commit box styles to separate file
1 parent 4f05d09 commit 14614b0

File tree

3 files changed

+66
-65
lines changed

3 files changed

+66
-65
lines changed

src/components/CommitBox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
stagedCommitMessageStyle,
99
stagedCommitStyle,
1010
textInputStyle
11-
} from '../style/BranchHeaderStyle';
11+
} from '../style/CommitBox';
1212

1313
/**
1414
* Interface describing component properties.

src/style/BranchHeaderStyle.ts

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -87,70 +87,6 @@ export const branchListItemStyle = style({
8787
color: 'var(--jp-ui-font-color1)'
8888
});
8989

90-
// need to override font-size from user agent stylesheet
91-
export const stagedCommitButtonStyle = style({
92-
backgroundColor: 'var(--jp-brand-color1)',
93-
backgroundImage: 'var(--jp-checkmark)',
94-
backgroundSize: '100%',
95-
backgroundRepeat: 'no-repeat',
96-
backgroundPosition: 'center',
97-
border: '0',
98-
color: 'white',
99-
flex: '1 1 auto',
100-
fontSize: 'var(--jp-ui-font-size1)',
101-
height: 'calc(2 * (1.25em - 1px))',
102-
padding: 'calc(var(--jp-code-padding) + 1px) 7px',
103-
width: '40px'
104-
});
105-
106-
export const stagedCommitButtonReadyStyle = style({
107-
opacity: 0.3
108-
});
109-
110-
export const stagedCommitButtonDisabledStyle = style({
111-
backgroundColor: 'lightgray'
112-
});
113-
114-
export const textInputStyle = style({
115-
outline: 'none'
116-
});
117-
118-
export const stagedCommitStyle = style({
119-
resize: 'none',
120-
display: 'flex',
121-
alignItems: 'flex-start',
122-
margin: '8px'
123-
});
124-
125-
// need to override font-size from user agent stylesheet
126-
export const stagedCommitMessageStyle = style({
127-
backgroundColor: 'var(--jp-layout-color1)',
128-
border: 'var(--jp-border-width) solid var(--jp-border-color2)',
129-
color: 'var(--jp-ui-font-color0)',
130-
fontSize: 'var(--jp-ui-font-size1)',
131-
fontWeight: 300,
132-
flex: '20 1 auto',
133-
overflowX: 'auto',
134-
padding: 'var(--jp-code-padding)',
135-
resize: 'none',
136-
width: '75%',
137-
138-
$nest: {
139-
'&:focus': {
140-
outline: 'none'
141-
},
142-
'&::-webkit-input-placeholder': {
143-
color: 'var(--jp-ui-font-color3)'
144-
},
145-
'&::-moz-placeholder': {
146-
color: 'var(--jp-ui-font-color3)'
147-
},
148-
'&::-ms-input-placeholder': {
149-
color: 'var(--jp-ui-font-color3)'
150-
}
151-
}
152-
});
153-
15490
export const branchHeaderCenterContent = style({
15591
paddingLeft: '5px',
15692
paddingRight: '5px',

src/style/CommitBox.ts

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import { style } from 'typestyle';
2+
3+
// need to override font-size from user agent stylesheet
4+
export const stagedCommitButtonStyle = style({
5+
backgroundColor: 'var(--jp-brand-color1)',
6+
backgroundImage: 'var(--jp-checkmark)',
7+
backgroundSize: '100%',
8+
backgroundRepeat: 'no-repeat',
9+
backgroundPosition: 'center',
10+
border: '0',
11+
color: 'white',
12+
flex: '1 1 auto',
13+
fontSize: 'var(--jp-ui-font-size1)',
14+
height: 'calc(2 * (1.25em - 1px))',
15+
padding: 'calc(var(--jp-code-padding) + 1px) 7px',
16+
width: '40px'
17+
});
18+
19+
export const stagedCommitButtonReadyStyle = style({
20+
opacity: 0.3
21+
});
22+
23+
export const stagedCommitButtonDisabledStyle = style({
24+
backgroundColor: 'lightgray'
25+
});
26+
27+
export const textInputStyle = style({
28+
outline: 'none'
29+
});
30+
31+
export const stagedCommitStyle = style({
32+
resize: 'none',
33+
display: 'flex',
34+
alignItems: 'flex-start',
35+
margin: '8px'
36+
});
37+
38+
// need to override font-size from user agent stylesheet
39+
export const stagedCommitMessageStyle = style({
40+
backgroundColor: 'var(--jp-layout-color1)',
41+
border: 'var(--jp-border-width) solid var(--jp-border-color2)',
42+
color: 'var(--jp-ui-font-color0)',
43+
fontSize: 'var(--jp-ui-font-size1)',
44+
fontWeight: 300,
45+
flex: '20 1 auto',
46+
overflowX: 'auto',
47+
padding: 'var(--jp-code-padding)',
48+
resize: 'none',
49+
width: '75%',
50+
51+
$nest: {
52+
'&:focus': {
53+
outline: 'none'
54+
},
55+
'&::-webkit-input-placeholder': {
56+
color: 'var(--jp-ui-font-color3)'
57+
},
58+
'&::-moz-placeholder': {
59+
color: 'var(--jp-ui-font-color3)'
60+
},
61+
'&::-ms-input-placeholder': {
62+
color: 'var(--jp-ui-font-color3)'
63+
}
64+
}
65+
});

0 commit comments

Comments
 (0)