summaryrefslogtreecommitdiffstats
path: root/application/basilisk/themes/shared/identity-block/identity-block.inc.css
blob: 6fa40e9db41b4d16cfdb5261b4833dd08fbbd32f (plain)
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
%if 0
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%endif

%filter substitution

%define selectorPrefix
%define selectorSuffix
%define iconVariant
%include icons.inc.css

%define selectorPrefix
%define selectorSuffix :-moz-lwtheme
%define iconVariant -black
%include icons.inc.css

#identity-box {
  font-size: .9em;
  padding: 3px 5px;
  overflow: hidden;
  /* The padding-left and padding-right transitions handle the delayed hiding of
     the forward button when hovered. */
  transition: padding-left, padding-right;
}

#urlbar[pageproxystate="valid"] > #identity-box.verifiedIdentity > #identity-icon-labels {
  color: hsl(92,100%,30%);
}

#urlbar[pageproxystate="valid"] > #identity-box.chromeUI > #identity-icon-labels {
%ifdef MOZ_OFFICIAL_BRANDING
  color: rgb(229,115,0);
%else
  color: inherit;
%endif
}

#identity-icon-labels:-moz-locale-dir(ltr) {
  padding-left: 2px;
}

#identity-icon-labels:-moz-locale-dir(rtl) {
  padding-right: 2px;
}

@conditionalForwardWithUrlbar@ > #forward-button[disabled] + #urlbar > #identity-box {
  padding-inline-start: calc(var(--backbutton-urlbar-overlap) + 5px);
}

@conditionalForwardWithUrlbar@:hover:not([switchingtabs]) > #forward-button[disabled] + #urlbar > #identity-box {
  /* Forward button hiding is delayed when hovered, so we should use the same
     delay for the identity box. We handle both horizontal paddings (for LTR and
     RTL), the latter two delays here are for padding-left and padding-right. */
  transition-delay: 100s, 100s;
}

@conditionalForwardWithUrlbar@:not(:hover) > #forward-button[disabled] + #urlbar > #identity-box {
  /* when not hovered anymore, trigger a new non-delayed transition to react to the forward button hiding */
  padding-inline-start: calc(var(--backbutton-urlbar-overlap) + 5.01px);
}

/* MAIN IDENTITY ICON */

#identity-icon {
  width: 16px;
  height: 16px;
}

#urlbar[pageproxystate="invalid"] > #identity-box > #identity-icon {
  opacity: .3;
}

#urlbar[actiontype="searchengine"] > #identity-box > #identity-icon {
  -moz-image-region: inherit;
  list-style-image: url(chrome://global/skin/icons/autocomplete-search.svg#search-icon);
  width: 16px;
  height: 16px;
}

#urlbar[actiontype="extension"] > #identity-box > #identity-icon {
  -moz-image-region: inherit;
  list-style-image: url(chrome://browser/skin/addons/addon-install-anchor.svg);
  width: 16px;
  height: 16px;
}

/* SHARING ICON */

#sharing-icon {
  width: 16px;
  height: 16px;
  margin-inline-start: -16px;
  position: relative;
  display: none;
}

#identity-box[sharing="camera"] > #sharing-icon {
  list-style-image: url("chrome://browser/skin/notification-icons.svg#camera-sharing");
}

#identity-box[sharing="microphone"] > #sharing-icon {
  list-style-image: url("chrome://browser/skin/notification-icons.svg#microphone-sharing");
}

#identity-box[sharing="screen"] > #sharing-icon {
  list-style-image: url("chrome://browser/skin/notification-icons.svg#screen-sharing");
}

#identity-box[sharing] > #sharing-icon {
  display: -moz-box;
  animation-delay: -1.5s;
}

#identity-box[sharing] > #identity-icon,
#sharing-icon {
  animation: 3s linear pulse infinite;
}

@keyframes pulse {
  0%, 16.66%, 83.33%, 100% {
    opacity: 0;
  }
  33.33%, 66.66% {
    opacity: 1;
  }
}

/* TRACKING PROTECTION ICON */

#tracking-protection-icon {
  width: 16px;
  height: 16px;
  margin-inline-start: 2px;
  margin-inline-end: 0;
}

#tracking-protection-icon[animate] {
  transition: margin-left 200ms ease-out, margin-right 200ms ease-out;
}

#tracking-protection-icon:not([state]) {
  margin-inline-end: -18px;
  pointer-events: none;
  opacity: 0;
  /* Only animate the shield in, when it disappears hide it immediately. */
  transition: none;
}

#urlbar[pageproxystate="invalid"] > #identity-box > #tracking-protection-icon {
  visibility: collapse;
}

/* CONNECTION ICON */

#connection-icon {
  width: 16px;
  height: 16px;
  margin-inline-start: 2px;
  visibility: collapse;
}