This repository has been archived by the owner on May 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
firefox-csd.scss
75 lines (62 loc) · 1.6 KB
/
firefox-csd.scss
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
/*
* A userChrome that uses the current gtk window decorations, no matter what theme is being used.
*
* Normally, the gtk decorations are only used in the default gtk theme.
*/
@use "sass:list";
$gtk-assets: "./gtk-3.0/assets";
$buttons: (
min: minimize,
max: maximize,
restore: maximized,
close: close,
);
$variants: (normal hover active);
$urls: ();
.titlebar-buttonbox:-moz-lwtheme {
gap: 7px;
margin-left: 2px;
}
.titlebar-button:-moz-lwtheme > .toolbarbutton-icon {
width: 18px !important;
}
toolbarbutton:-moz-lwtheme:hover > image.toolbarbutton-icon {
background-color: rgba(0, 0, 0, 0%) !important;
}
@mixin gtk-control($file, $variant, $backdrop: false) {
$pseudo: null;
@if $backdrop {
@if $variant == normal {
$pseudo: ":-moz-window-inactive";
} @else {
$pseudo: ":#{$variant}:-moz-window-inactive";
}
$variant: "backdrop-#{$variant}";
} @else if $variant != normal {
$pseudo: ":#{$variant}";
} @else {
$pseudo: "";
}
$url: url("#{$gtk-assets}/#{$file}-#{$variant}.svg");
$urls: list.append($urls, $url) !global;
&#{$pseudo} > image.toolbarbutton-icon {
background-image: $url !important;
}
}
@each $cls, $file in $buttons {
toolbarbutton.titlebar-#{$cls}:-moz-lwtheme {
@each $variant in $variants {
@include gtk-control($file, $variant);
@include gtk-control($file, $variant, $backdrop: true);
}
}
}
// pre-load all the images so there aren't any load flashes
.titlebar-buttonbox:-moz-lwtheme::after {
position: absolute;
width: 0;
height: 0;
overflow: hidden;
z-index: -1;
content: #{$urls};
}