Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4e912d2

Browse files
authoredFeb 23, 2020
Disallow leading zeroes in Less (#10407)
1 parent 71d5a09 commit 4e912d2

File tree

11 files changed

+102
-101
lines changed

11 files changed

+102
-101
lines changed
 

‎.stylelintrc‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ rules:
1111
declaration-empty-line-before: null
1212
indentation: 4
1313
no-descending-specificity: null
14+
number-leading-zero: never
1415
rule-empty-line-before: null
1516
selector-pseudo-element-colon-notation: null

‎web_src/less/_admin.less‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
.ui.header,
3434
.ui.segment {
35-
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15);
35+
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, .15);
3636
}
3737

3838
&.user {

‎web_src/less/_base.less‎

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ a {
180180
}
181181

182182
.rounded {
183-
border-radius: 0.28571429rem !important;
183+
border-radius: .28571429rem !important;
184184
}
185185

186186
.wrap {
@@ -232,7 +232,7 @@ code,
232232
&.light {
233233
background-color: white;
234234
border-bottom: 1px solid #dddddd;
235-
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.04);
235+
box-shadow: 0 2px 3px rgba(0, 0, 0, .04);
236236
}
237237

238238
.column .menu {
@@ -254,7 +254,7 @@ code,
254254
}
255255

256256
.top.menu a.item:hover {
257-
color: rgba(0, 0, 0, 0.45);
257+
color: rgba(0, 0, 0, .45);
258258
}
259259

260260
.top.menu .menu {
@@ -266,7 +266,7 @@ code,
266266
}
267267

268268
.svg {
269-
margin-right: 0.75em;
269+
margin-right: .75em;
270270
}
271271

272272
.searchbox {
@@ -285,7 +285,7 @@ code,
285285
#navbar {
286286
width: 100vw;
287287
min-height: 52px;
288-
padding: 0 0.5rem;
288+
padding: 0 .5rem;
289289
}
290290

291291
#navbar .brand {
@@ -359,11 +359,11 @@ code,
359359
/* This fixes the commit graph button on the commits page */
360360

361361
.menu:not(.vertical) .item > .button.compact {
362-
padding: 0.58928571em 1.125em;
362+
padding: .58928571em 1.125em;
363363
}
364364

365365
.menu:not(.vertical) .item > .button.small {
366-
font-size: 0.92857143rem;
366+
font-size: .92857143rem;
367367
}
368368

369369
&.menu .ui.dropdown.item .menu .item {
@@ -379,7 +379,7 @@ code,
379379
}
380380

381381
&.dropdown .menu > .header {
382-
font-size: 0.8em;
382+
font-size: .8em;
383383
}
384384

385385
.text {
@@ -456,7 +456,7 @@ code,
456456
}
457457

458458
&.small {
459-
font-size: 0.75em;
459+
font-size: .75em;
460460
}
461461

462462
&.normal {
@@ -522,7 +522,7 @@ code,
522522
}
523523

524524
.header > i + .content {
525-
padding-left: 0.75rem;
525+
padding-left: .75rem;
526526
vertical-align: middle;
527527
}
528528

@@ -647,7 +647,7 @@ code,
647647

648648
.migrate {
649649
color: #888888 !important;
650-
opacity: 0.5;
650+
opacity: .5;
651651
a {
652652
color: #444444 !important;
653653

@@ -712,15 +712,15 @@ code,
712712

713713
.file-comment {
714714
font: 12px @monospaced-fonts, monospace;
715-
color: rgba(0, 0, 0, 0.87);
715+
color: rgba(0, 0, 0, .87);
716716
}
717717

718718
.ui.floating.dropdown {
719719
.overflow.menu {
720720
.scrolling.menu.items {
721721
border-radius: 0 !important;
722722
box-shadow: none !important;
723-
border-bottom: 1px solid rgba(34, 36, 38, 0.15);
723+
border-bottom: 1px solid rgba(34, 36, 38, .15);
724724
}
725725
}
726726
}
@@ -745,7 +745,7 @@ footer {
745745

746746
.container {
747747
width: 100vw !important;
748-
padding: 0 0.5rem;
748+
padding: 0 .5rem;
749749
max-width: calc(100vw - 1rem) !important;
750750

751751
.fa {
@@ -885,11 +885,11 @@ footer {
885885
}
886886

887887
.ui.menu.new-menu::-webkit-scrollbar-track {
888-
background: rgba(0, 0, 0, 0.01);
888+
background: rgba(0, 0, 0, .01);
889889
}
890890

891891
.ui.menu.new-menu::-webkit-scrollbar-thumb {
892-
background: rgba(0, 0, 0, 0.2);
892+
background: rgba(0, 0, 0, .2);
893893
}
894894

895895
.ui.menu.new-menu:after {
@@ -990,15 +990,15 @@ footer {
990990

991991
/* Tab color tweaks */
992992
.ui.tabular.menu .item {
993-
color: rgba(0, 0, 0, 0.5);
993+
color: rgba(0, 0, 0, .5);
994994
}
995995

996996
.ui.tabular.menu .item:hover {
997-
color: rgba(0, 0, 0, 0.8);
997+
color: rgba(0, 0, 0, .8);
998998
}
999999

10001000
.ui.tabular.menu .item.active {
1001-
color: rgba(0, 0, 0, 0.9);
1001+
color: rgba(0, 0, 0, .9);
10021002
}
10031003

10041004
/* multiple radio or checkboxes as inline element */
@@ -1026,7 +1026,7 @@ i.icon.centerlock {
10261026
}
10271027

10281028
.ui.label > .detail .icons {
1029-
margin-right: 0.25em;
1029+
margin-right: .25em;
10301030
}
10311031

10321032
.ui.label > .detail .icons .icon {
@@ -1152,7 +1152,7 @@ i.icon.centerlock {
11521152
}
11531153

11541154
.octicon-tiny {
1155-
font-size: 0.85714286rem;
1155+
font-size: .85714286rem;
11561156
}
11571157

11581158
.ui.basic.blue.button,
@@ -1180,14 +1180,14 @@ i.icon.centerlock {
11801180
}
11811181

11821182
.ui.popup .ui.label {
1183-
margin-bottom: 0.4em;
1183+
margin-bottom: .4em;
11841184
}
11851185

11861186
.color-icon {
1187-
padding-right: 0.7em;
1188-
padding-left: 0.5em;
1189-
margin-right: 0.5em;
1190-
margin-left: 0.5em;
1187+
padding-right: .7em;
1188+
padding-left: .5em;
1189+
margin-right: .5em;
1190+
margin-left: .5em;
11911191
display: inline;
11921192
border: 1px solid #ccc;
11931193
border-radius: 500em;

‎web_src/less/_dashboard.less‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373

7474
.dashboard-navbar {
7575
width: 100vw;
76-
padding: 0 0.5rem;
76+
padding: 0 .5rem;
7777
}
7878
}
7979

@@ -118,7 +118,7 @@
118118
code {
119119
padding: 1px;
120120
font-size: 85%;
121-
background-color: rgba(0, 0, 0, 0.04);
121+
background-color: rgba(0, 0, 0, .04);
122122
border-radius: 3px;
123123
word-break: break-all;
124124
}

‎web_src/less/_form.less‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.form {
22
.help {
33
color: #999999;
4-
padding-top: 0.6em;
5-
padding-bottom: 0.6em;
4+
padding-top: .6em;
5+
padding-bottom: .6em;
66
display: inline-block;
77
}
88
}
@@ -109,7 +109,7 @@
109109
@media screen and (max-height: 575px) {
110110
#rc-imageselect,
111111
.g-recaptcha {
112-
transform: scale(0.77);
112+
transform: scale(.77);
113113
transform-origin: 0 0;
114114
}
115115
}

‎web_src/less/_markdown.less‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
}
108108

109109
h1 {
110-
padding-bottom: 0.3em;
110+
padding-bottom: .3em;
111111
font-size: 2.25em;
112112
line-height: 1.2;
113113
border-bottom: 1px solid #eeeeee;
@@ -118,7 +118,7 @@
118118
}
119119

120120
h2 {
121-
padding-bottom: 0.3em;
121+
padding-bottom: .3em;
122122
font-size: 1.75em;
123123
line-height: 1.225;
124124
border-bottom: 1px solid #eeeeee;
@@ -366,18 +366,18 @@
366366

367367
code,
368368
tt {
369-
padding: 0.2em 0;
369+
padding: .2em 0;
370370
margin: 0;
371371
font-size: 85%;
372-
background-color: rgba(0, 0, 0, 0.04);
372+
background-color: rgba(0, 0, 0, .04);
373373
border-radius: 3px;
374374
}
375375

376376
code:before,
377377
code:after,
378378
tt:before,
379379
tt:after {
380-
letter-spacing: -0.2em;
380+
letter-spacing: -.2em;
381381
content: "\00a0";
382382
}
383383

0 commit comments

Comments
 (0)
Please sign in to comment.