Skip to content

Commit 5e9a28a

Browse files
committed
[bug] fix theme saved edit control border radius not being the correct shape
1 parent 67a1be8 commit 5e9a28a

File tree

6 files changed

+63
-38
lines changed

6 files changed

+63
-38
lines changed

‎package-lock.json‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nightTab",
3-
"version": "5.24.0",
3+
"version": "5.24.1",
44
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
55
"main": "index.js",
66
"scripts":{

‎src/css/theme.css‎

Lines changed: 55 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
.theme-preset-item,
22
.theme-custom-item{
3+
position: relative;
4+
}
5+
6+
.theme-preset-tile,
7+
.theme-custom-tile{
8+
position: relative;
39
width:var(--theme-preview-size);
410
height:var(--theme-preview-size);
5-
position: relative;
611
}
712

813
.theme-preset-button,
@@ -20,43 +25,63 @@
2025
transition: height var(--layout-timing-extra-fast), box-shadow var(--layout-timing-extra-fast), border-radius var(--layout-timing-extra-fast);
2126
}
2227

28+
.is-theme-custom-edit .theme-custom-button{
29+
border-radius:var(--theme-radius) var(--theme-radius) 00;
30+
height:calc(100%-var(--theme-custom-edit-height));
31+
box-shadow:var(--theme-shadow-bottom-medium);
32+
}
33+
34+
.is-theme-custom-edit .theme-custom-button:hover{
35+
box-shadow:var(--form-ring-hover);
36+
}
37+
38+
.is-theme-custom-edit .theme-custom-button:focus,
39+
.is-theme-custom-edit .theme-custom-button:active{
40+
box-shadow:var(--form-ring-accent);
41+
}
42+
2343
.theme-custom-control{
24-
border-radius:00var(--theme-radius) var(--theme-radius);
44+
border-radius:var(--theme-radius);
2545
width:100%;
26-
height:0;
46+
height:100%;
2747
position: absolute;
2848
bottom:0;
2949
overflow: hidden;
3050
display: flex;
31-
justify-content: flex-start;
32-
align-items: stretch;
51+
align-items: flex-end;
3352
z-index:1;
34-
transition: height var(--layout-timing-extra-fast);
53+
transition: height var(--layout-timing-extra-fast), border-radius var(--layout-timing-extra-fast);
3554
}
3655

37-
.theme-custom-control-item{
56+
.theme-custom-control .theme-custom-control-item{
3857
padding:0;
3958
border-radius:0;
4059
flex:11 auto;
60+
position: relative;
61+
bottom:0;
62+
min-height: initial;
63+
height:0;
64+
transition: height var(--layout-timing-extra-fast);
4165
}
4266

43-
.is-theme-custom-edit .theme-custom-button{
44-
border-radius:var(--theme-radius) var(--theme-radius) 00;
45-
height:calc(100%-var(--theme-custom-edit-height));
46-
box-shadow:var(--theme-shadow-bottom-medium);
67+
.is-theme-custom-edit .theme-custom-control-item{
68+
height:var(--theme-custom-edit-height);
4769
}
4870

49-
.is-theme-custom-edit .theme-custom-button:hover{
50-
box-shadow:var(--form-ring-hover);
71+
.theme-custom-control-item .button-icon{
72+
font-size:1em;
73+
position: relative;
74+
transition: bottom var(--layout-timing-extra-fast), left var(--layout-timing-extra-fast), right var(--layout-timing-extra-fast);
5175
}
5276

53-
.is-theme-custom-edit .theme-custom-button:focus,
54-
.is-theme-custom-edit .theme-custom-button:active{
55-
box-shadow:var(--form-ring-accent);
77+
.theme-custom-control-item:first-child .button-icon{
78+
bottom:calc(var(--theme-radius) /16);
79+
left:calc(var(--theme-radius) /8);
5680
}
5781

58-
.is-theme-custom-edit .theme-custom-control{
59-
height:var(--theme-custom-edit-height);
82+
.theme-custom-control-item:last-child .button-icon{
83+
bottom:calc(var(--theme-radius) /16);
84+
right:calc(var(--theme-radius) /8);
6085
}
6186

6287
.theme-preset-preview,
@@ -85,8 +110,8 @@
85110
.theme-custom-background-03,
86111
.theme-custom-background-04,
87112
.theme-custom-accent{
88-
width:100%;
89-
height:100%;
113+
width:var(--theme-preview-size);
114+
height:var(--theme-preview-size);
90115
position: absolute;
91116
top:0;
92117
left:0;
@@ -155,7 +180,7 @@
155180
.theme-preset-accent,
156181
.theme-custom-accent{
157182
z-index:5;
158-
clip-path:circle(30% at 100%100%);
183+
clip-path:circle(30% at calc(100%-calc(var(--theme-radius) /12)) calc(100%-calc(var(--theme-radius) /12)));
159184
}
160185

161186
.theme-preset-accent{
@@ -167,27 +192,27 @@
167192
}
168193

169194
.is-theme-custom-edit .theme-custom-accent{
170-
clip-path:circle(30% at 100%60%);
195+
clip-path:circle(30% at calc(100%-calc(var(--theme-radius) /12)) calc(60%-calc(var(--theme-radius) /12)));
171196
}
172197

173198
.theme-preset-name,
174199
.theme-custom-name{
175200
color:rgb(var(--theme-style-text));
176201
font-style: normal;
177-
font-size:0.8em;
202+
font-size:0.75em;
178203
text-align: left;
179204
display: block;
180-
max-width:calc(100%-2em);
181-
max-height:calc(100%-2em);
205+
max-width:calc(100%-1.5em-calc(var(--theme-radius) /3));
206+
max-height:calc(100%-1.5em-calc(var(--theme-radius) /3));
182207
position: absolute;
183-
top:1em;
184-
left:1em;
208+
top:calc(0.75em+calc(var(--theme-radius) /6));
209+
left:calc(0.75em+calc(var(--theme-radius) /6));
185210
z-index:6;
186211
overflow: hidden;
187212
text-overflow: ellipsis;
188213
white-space: initial;
189214
transform:scale(1);
190-
transition: transform var(--layout-timing-extra-fast);
215+
transition:color var(--layout-timing-extra-fast),transformvar(--layout-timing-extra-fast), max-width var(--layout-timing-extra-fast), max-height var(--layout-timing-extra-fast), top var(--layout-timing-extra-fast), leftvar(--layout-timing-extra-fast);
191216
}
192217

193218
.theme-preset-button:focus .theme-preset-background-02,
@@ -215,12 +240,12 @@
215240
.theme-preset-button:hover .theme-preset-accent,
216241
.theme-custom-button:focus .theme-custom-accent,
217242
.theme-custom-button:hover .theme-custom-accent{
218-
clip-path:circle(40% at 100%100%);
243+
clip-path:circle(40% at calc(100%-calc(var(--theme-radius) /12)) calc(100%-calc(var(--theme-radius) /12)));
219244
}
220245

221246
.is-theme-custom-edit .theme-custom-button:focus .theme-custom-accent,
222247
.is-theme-custom-edit .theme-custom-button:hover .theme-custom-accent{
223-
clip-path:circle(40% at 100%60%);
248+
clip-path:circle(40% at calc(100%-calc(var(--theme-radius) /12)) calc(60%-calc(var(--theme-radius) /12)));
224249
}
225250

226251
.theme-color-box{

‎src/js/theme.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2275,10 +2275,10 @@ var theme = (function(){
22752275
varthemeCustomButton=helper.node("button|class:theme-custom-button button button-block button-ring,tabindex:-1");
22762276
varthemeCustomPreview=helper.node("span|class:theme-custom-preview");
22772277
varthemeCustomControl=helper.node("div|class:theme-custom-control");
2278-
varthemeCustomEdit=helper.node("button|class:theme-custom-control-item theme-custom-control-item-remove button button-small,tabindex:-1");
2279-
varthemeCustomEditIcon=helper.node("spa|class:button-icon icon-edit");
2280-
varthemeCustomRemove=helper.node("button|class:theme-custom-control-item theme-custom-control-item-remove button button-small,tabindex:-1");
2281-
varthemeCustomRemoveIcon=helper.node("spa|class:button-icon icon-close");
2278+
varthemeCustomEdit=helper.node("button|class:theme-custom-control-item theme-custom-control-item-remove button,tabindex:-1");
2279+
varthemeCustomEditIcon=helper.node("span|class:button-icon icon-edit");
2280+
varthemeCustomRemove=helper.node("button|class:theme-custom-control-item theme-custom-control-item-remove button,tabindex:-1");
2281+
varthemeCustomRemoveIcon=helper.node("span|class:button-icon icon-close");
22822282
varshadeSteps=4;
22832283
varrgb=arrayItem.color.rgb;
22842284
varhsl=arrayItem.color.hsl;

‎src/js/version.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
varversion=(function(){
22

3-
varcurrent="5.24.0";
3+
varcurrent="5.24.1";
44

55
varname="Zonked Tarsier";
66

‎src/manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "nightTab",
33
"short_name": "nightTab",
44
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
5-
"version": "5.24.0",
5+
"version": "5.24.1",
66
"manifest_version": 2,
77
"chrome_url_overrides":{
88
"newtab": "index.html"

0 commit comments

Comments
(0)