Skip to content

Commit 25bc688

Browse files
committed
popup: Add light theme
Closes browserpass#98
1 parent 300c732 commit 25bc688

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed

src/options/interface.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,12 @@ function view(ctl, params) {
5959
nodes.push(createInput.call(this, "gpgPath", "Custom gpg binary", "/path/to/gpg"));
6060

6161
nodes.push(m("h3", "Theme"));
62-
nodes.push(createDropdown.call(this, "theme", [m("option", { value: "dark" }, "Dark")]));
62+
nodes.push(
63+
createDropdown.call(this, "theme", [
64+
m("option", { value: "dark" }, "Dark"),
65+
m("option", { value: "light" }, "Light")
66+
])
67+
);
6368

6469
nodes.push(m("h3", "Custom store locations"));
6570
nodes.push(

src/popup/colors-light.less

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
@import "colors.less";
2+
3+
.colors-light {
4+
.colors(
5+
@bg-color: #f1f3f5,
6+
@default-bg-color: #dee2e6,
7+
@hover-bg-color: #ced4da,
8+
@text-color: #343a40,
9+
@error-text-color: #e03131,
10+
@dim-text-color: #868e96,
11+
@badge-color: #b8b8b8,
12+
@input-bg-color: #eaeef1,
13+
@active-input-bg-color: #e8ebee,
14+
@input-text-color: #343a40,
15+
@hint-bg-color: #1c7ed6,
16+
@hint-color: #e7f5ff
17+
);
18+
19+
.part.login .name .line1 .recent,
20+
.part.login .action.copy-password,
21+
.part.login .action.copy-user {
22+
filter: invert(85%);
23+
}
24+
25+
.part.login .name .line1 .recent:focus,
26+
.part.login .name .line1 .recent:hover,
27+
.part.login .action.copy-password:focus,
28+
.part.login .action.copy-password:hover,
29+
.part.login .action.copy-user:focus,
30+
.part.login .action.copy-user:hover {
31+
// colour such that invert(85%) ~= @hover-bg-color
32+
background-color: #0c0804;
33+
}
34+
}

src/popup/popup.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@import "colors-dark.less";
2+
@import "colors-light.less";
23

34
@login-height: 53px;
45
@max-logins-height: @login-height * 7;

0 commit comments

Comments
 (0)