Skip to content

Commit daeebc2

Browse files
committed
minor update
- use postcss as less formatter - make div.line scrollable
1 parent fbbcde6 commit daeebc2

File tree

3 files changed

+29
-33
lines changed

3 files changed

+29
-33
lines changed

manifest/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"default_locale": "en",
44
"name": "__MSG_extName__",
55
"description": "__MSG_extDesc__",
6-
"version": "1.0",
6+
"version": "1.1",
77
"author": "Guangyang Wen",
88
"homepage_url": "https://github.com/gywn/",
99
"background": {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"store2": "^2.7.0",
3131
"style-loader": "^0.22.1",
3232
"typescript": "^3.0.1",
33+
"web-ext": "^2.9.1",
3334
"webpack": "^4.16.5",
3435
"webpack-cli": "^3.1.0"
3536
},

style/view.less

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,13 @@
2828
#link-stack {
2929
display: flex;
3030
flex-direction: column;
31+
align-items: center;
32+
justify-content: space-between;
33+
min-height: 100%;
3134
padding: @large-gap;
3235
padding-bottom: 16px;
33-
min-height: 100%;
3436
background-color: @background-color-base;
3537

36-
align-items: center;
37-
justify-content: space-between;
38-
3938
@media (max-width: 799px) {
4039
& {
4140
padding-top: 0;
@@ -46,12 +45,12 @@
4645

4746
.content {
4847
position: relative;
48+
width: calc(800px - 2 * @large-gap);
4949
margin-bottom: @large-gap;
5050
padding-bottom: @large-gap;
51-
width: calc(800px - 2 * @large-gap);
5251
border-radius: @gap;
5352
background-color: white;
54-
box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.24);
53+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
5554

5655
@media (max-width: 799px) {
5756
& {
@@ -68,8 +67,8 @@
6867
height: @text-height;
6968
border-radius: @text-height / 2;
7069
background-color: @primary-color;
70+
animation: blinker 0.5s linear infinite;
7171
opacity: 1;
72-
animation: blinker .5s linear infinite;
7372

7473
&.hidden {
7574
visibility: hidden;
@@ -78,16 +77,15 @@
7877

7978
.title-bar {
8079
display: flex;
80+
align-items: center;
81+
justify-content: space-between;
8182
margin-bottom: @large-gap;
8283
padding: 16px @large-gap;
8384
border-bottom: @border-width-base @border-style-base @border-color-split;
8485

85-
justify-content: space-between;
86-
align-items: center;
87-
8886
.root-title {
89-
font-weight: 500;
9087
font-size: @font-size-lg;
88+
font-weight: 500;
9189
line-height: @font-size-lg;
9290
}
9391

@@ -97,37 +95,36 @@
9795
}
9896

9997
.inner-link-stack {
100-
overflow: hidden;
10198
margin: 0 @large-gap;
99+
overflow: hidden;
102100

103101
.line {
104102
display: flex;
105-
font-weight: 500;
103+
align-items: center;
104+
overflow-x: scroll;
106105
font-size: @text-height;
106+
font-weight: 500;
107107
line-height: @text-height;
108108

109-
align-items: center;
110-
111109
&:not(:last-of-type) {
112110
margin-bottom: @gap;
113111
}
114112

115113
.link {
114+
--link-bg: @primary-color;
116115
display: flex;
116+
flex-shrink: 1;
117117
border: @border-width solid var(--link-bg);
118118
border-radius: @border-radius-base;
119119
background-color: var(--link-bg);
120120
text-decoration: none;
121121

122-
flex-shrink: 1;
123-
--link-bg: @primary-color;
124-
125122
&:hover {
126123
--link-bg: @primary-5;
127124
}
128125

129126
&.mainLink {
130-
max-width: calc(100% - @block-height - @gap);
127+
max-width: calc(100% - 4 * @block-height - @gap);
131128
}
132129

133130
&.sourceLink {
@@ -136,31 +133,30 @@
136133

137134
.favicon-wrapper {
138135
display: flex;
139-
margin-right: @border-width;
136+
align-items: center;
137+
justify-content: center;
140138
width: @content-height;
141139
height: @content-height;
140+
margin-right: @border-width;
142141
border-radius: @border-radius-base - @border-width;
143142
background-color: white;
144-
145-
align-items: center;
146-
justify-content: center;
147143
}
148144

149145
.link-text {
150-
overflow: hidden;
146+
flex-shrink: 1;
151147
padding: (@content-height - @text-height) / 2;
148+
overflow: hidden;
152149
color: white;
153150
text-overflow: ellipsis;
154151
white-space: nowrap;
155-
156-
flex-shrink: 1;
157152
}
158153
}
159154

160-
.source-connector, .remove {
161-
padding: (@content-height - @text-height) / 2;
155+
.source-connector,
156+
.remove {
162157
width: @block-height;
163158
height: @block-height;
159+
padding: (@content-height - @text-height) / 2;
164160
border: @border-width solid transparent;
165161
color: @text-color;
166162
text-align: center;
@@ -169,11 +165,10 @@
169165
}
170166

171167
.remove {
168+
flex-shrink: 0;
172169
margin-right: @gap;
173170
border-radius: @block-height / 2;
174171
cursor: pointer;
175-
176-
flex-shrink: 0;
177172
}
178173

179174
.remove:hover {
@@ -184,15 +179,15 @@
184179
}
185180

186181
.inner-link-stack-info {
182+
max-width: 520px; // Ant Design Modal's default width
187183
margin: 0 auto;
188184
padding: 0 @large-gap;
189-
max-width: 520px; // Ant Design Modal's default width
190185
color: @text-color-secondary;
191186
}
192187
}
193188

194189
.footer {
195-
a, {
190+
a {
196191
color: @text-color-secondary;
197192

198193
&:hover {

0 commit comments

Comments
 (0)