forked from brave/browser-laptop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwindow.less
164 lines (140 loc) · 3.12 KB
/
window.less
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
/* 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/. */
@import "animations.less";
@import "variables.less";
:root {
--default-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", sans-serif;
}
* {
margin: 0;
padding: 0;
font-family: var(--default-font-family);
}
html,
#window {
background: #fff;
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
width: 100%;
&.isFullScreen {
.top, .downloadsBar, .hrefPreview {
display: none;
}
}
}
#appContainer,
#windowContainer {
width: 100%;
height: 100%;
position: absolute;
}
.top {
background: linear-gradient(to bottom, #eaeaea, #f2f2f2, );
}
.mainContainer {
display: flex;
flex-direction: row;
flex-grow: 1;
box-shadow: 0 -1px 0 #bbb;
width: 100%;
.tabContainer {
flex-grow: 1;
position: relative;
}
>div.tabs {
width: 180px;
overflow-y: scroll;
}
}
.frameWrapper {
height: 100%;
width: 100%;
z-index: @zindexWindow;
position: absolute;
top: 0;
left: 0;
// Needed to be able to click and drag to select content in pages.
-webkit-user-select: none;
webview {
background-color: #fff;
border: 0;
height: 100%;
outline: none;
width: 100%;
}
.webviewContainer {
height: 100%;
width: 100%;
&.isPreview {
opacity: 0.5;
animation: tabFadeIn 0.75s ease-in-out;
animation-fill-mode: forwards;
}
}
&:not(.isActive) {
z-index: @zindexWindowNotActive;
&.isPreview {
background: gray;
z-index: @zindexWindowIsPreview;
}
// Webviews can cause flickers w/ Chrome v49 if left visible
// in the background. This also has a major benefit for background
// tabs that have video and animations in them.
&:not(.isPreview) {
visibility: hidden;
}
}
}
.hrefPreview {
background: @chromePrimary;
border-color: @chromeSecondary;
border-style: solid;
border-width: 1px 1px 0 0;
border-top-right-radius: @borderRadius;
bottom: 0;
color: @chromeText;
font-size: @defaultFontSize;
left: 0;
max-width: 40%;
overflow-x: hidden;
padding: 0.2em 0.5em;
position: absolute;
text-overflow: ellipsis;
white-space: nowrap;
&.right {
left: auto;
right: 0;
border-width: 1px 0 0 1px;
border-top-left-radius: @borderRadius;
border-top-right-radius: 0;
}
}
body.fullScreen .frameWrapper.isActive {
z-index: @zindexWindowFullScreen;
}
/* The fullscreen notice is shown above the fullscreen element */
body.fullScreen .banner {
position: absolute;
z-index: @zindexWindowFullScreenBanner;
top: 0;
opacity: 1;
transition: opacity 2s ease-in-out;
}
body.fullScreen .banner.fade {
opacity: 0;
}
[draggable] {
-webkit-user-select: none;
}
.link {
color: @linkColor;
cursor: pointer;
text-decoration: underline;
}
// In React we often want to have elements but without href, so force pointer cursor
a {
cursor: pointer;
}