Repository navigation
Expand file tree
/
Copy pathcommit-view.less
More file actions
137 lines (114 loc) · 2.6 KB
/
Copy pathcommit-view.less
File metadata and controls
137 lines (114 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
@import "variables";
.github-CommitView {
padding: @component-padding;
border-top: 1px solid @base-border-color;
flex: 0 0 auto;
&-editor {
position: relative;
border: 1px solid @input-border-color;
border-radius: @component-border-radius;
padding: @component-padding / 2;
font-size: @font-size;
background-color: @syntax-background-color;
}
&-editor.hidden {
display: none;
}
&-editor atom-text-editor {
height: 100px;
.cursor-line.cursor-line.cursor-line {
background-color: transparent;
}
}
&-expandButton {
position: absolute;
right: 0;
bottom: 0;
padding: @component-padding / 2;
line-height: 1;
border: none;
background-color: @syntax-background-color;
cursor: default;
opacity: .3;
&:hover {
opacity: 1;
}
&:active {
opacity: .5;
}
&:before {
margin: 0;
}
}
&-bar {
display: flex;
align-items: center;
margin-top: @component-padding;
}
&-label {
margin-right: @component-padding;
}
&-button {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
cursor: default;
&.is-secondary {
flex: 0 1 auto;
margin-right: @component-padding;
}
}
&-remaining-characters {
width: 1.25em;
text-align: right;
margin-left: @component-padding;
color: @text-color-subtle;
&.is-warning { color: @text-color-warning; }
&.is-error { color: @text-color-error; }
}
// States ---------------------------------------------------
&-editor.is-expanded {
background-color: transparent;
atom-text-editor {
display: none;
}
.github-CommitView-expandButton {
position: relative;
width: 100%;
line-height: inherit;
background-color: transparent;
opacity: .5;
&::before {
margin-right: @component-padding / 2;
}
&::after {
content: "Toggle expanded commit message";
}
&:active {
opacity: .3;
}
}
}
}
// Hacks ---------------------------------------------------
// TODO: Unhack if possible
// Fix focus styles
// Since it's not possible to add a padding to <atom-text-editor>
// a pseudo element is used to add the border when focused.
.theme-one-dark-ui,
.theme-one-light-ui {
.github-CommitView-editor atom-text-editor.is-focused {
box-shadow: none;
&:before {
content: "";
position: absolute;
top: -2px;
left: -2px;
right: -2px;
bottom: -2px;
border: 2px solid;
border-color: inherit;
border-radius: @component-border-radius;
}
}
}