forked from jisaacks/GitGutter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitgutter_popup.css
171 lines (149 loc) · 4.52 KB
/
gitgutter_popup.css
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
/**********************************************************************
This is the default stylesheet for GitGutter diff popup.
It defines additional rules to merge with mdpopups' styleshets.
NOTE: You can use all jinja2 template variables of mdpopups.
Examples:
var.is_dark
var.is_light
var.sublime_version (mdpopups 2.0.0+)
var.mdpopups_version (mdpopups 2.0.0+)
The popup's HTML structure:
<div class="mdpopups">
<div class="git-gutter">
<div class="toolbar">
<a href="revert"><symbol>⟲</symbol></a>
...
<a href="revert"><text>(revert)</text></a>
...
</div>
<div class="highlight">
... the content goes in here
</div>
</div>
</div>
Copy the values you want to change into your user directory
and change them there to overwrite the stylesheet.
*********************************************************************/
/**
* POPUP BACKGROUND
*
* Compatibility rules to fix default popup background color
* for light and dark color schemes of Sublime Text < 3132.
**/
html.dark {
background-color: color(var(--background) blend(white 85%));
--mdpopups-hl-bg: color(var(--background) blend(white 95%));
--diffpopup-ins-bg: color(green blend(black 60%));
--diffpopup-ins-fg: color(green blend(white 40%));
--diffpopup-del-bg: color(red blend(black 60%));
--diffpopup-del-fg: color(red blend(white 40%));
--diffpopup-chg-ins-bg: color(#769908 blend(black 95%));
--diffpopup-chg-ins-fg: color(#769908 blend(white 20%));
--diffpopup-chg-del-bg: color(orangered blend(black 80%));
--diffpopup-chg-del-fg: color(orangered blend(white 40%));
}
html.light {
background-color: color(var(--background) blend(black 80%));
--mdpopups-hl-bg: color(var(--background) blend(black 93%));
--diffpopup-ins-bg: color(green blend(white 25%));
--diffpopup-ins-fg: color(green blend(black 80%));
--diffpopup-del-bg: color(red blend(white 25%));
--diffpopup-del-fg: color(red blend(black 80%));
--diffpopup-chg-ins-bg: color(#93921b blend(white 20%));
--diffpopup-chg-ins-fg: color(#93921b blend(black 85%)); /*#b3ca23*/
--diffpopup-chg-del-bg: color(orangered blend(white 20%));
--diffpopup-chg-del-fg: color(orangered blend(black 85%));
}
/* Compatibility rules for correct popup borders with mdpopups 1.x.x */
div.mdpopups {
margin: 0;
padding: 0;
}
/**
* POPUP BORDER
*
* Set padding to the desired border-width.
**/
div.git-gutter {
margin: 0;
padding: 0;
}
/**
* TOOLBAR
*
* The navigation toolbar
**/
.git-gutter div.toolbar {
margin: 0;
padding: 0.0rem 0.4rem 0.2rem 0.4em;
}
/**
* ICON BUTTONS
*
* <symbol>⟲</symbol>
*
* Unicode chars are rendered smaller than normal text and sometimes ugly
* depending on font-family, so force fonts known to render well.
* This rule is used to fix the font-family and font-size.
**/
.git-gutter div.toolbar symbol {
font-family: "Roboto Mono", "Segoe UI", monospace;
font-size: 1.2rem;
margin: 0;
padding: 0.0rem 0.1rem 0.0rem 0.1em;
}
/**
* LINKS
*
* Don't underline links.
**/
.git-gutter a {
text-decoration: none;
}
/**
* TEXT VIEW
*
* Shows the old content or diff.
**/
.git-gutter div.highlight {
font-family: "sf mono", "Roboto Mono", "Liberation Mono", Menlo, Courier, monospace;
border-style: none;
border-radius: 0;
line-height: 1.3rem;
margin: 0;
padding: 0.7rem 0.7rem 0.6rem 0.7rem;
}
/**
* TEXT LINE
*
* Each line is wrapped into <p> tag.
**/
.git-gutter .highlight p {
margin: 0;
}
/**
* DIFF HIGHLIGHTING
*
* The following entries apply to the "highlight difference"
* mode of the popup.
**/
/* Highlight text, that has been inserted. */
.git-gutter .hi-ins {
color: var(--diffpopup-ins-fg);
background-color: var(--diffpopup-ins-bg);
}
/* Highlight text, that has been deleted. */
.git-gutter .hi-del {
color: var(--diffpopup-del-fg);
background-color: var(--diffpopup-del-bg);
}
/* Highlight text, that has been inserted and substitutes other text. */
.git-gutter .hi-chg-ins {
color: var(--diffpopup-chg-ins-fg);
background-color: var(--diffpopup-chg-ins-bg);
}
/* Highlight text, that has been deleted and is substituted by other text. */
.git-gutter .hi-chg-del {
color: var(--diffpopup-chg-del-fg);
background-color: var(--diffpopup-chg-del-bg);
}