File tree 3 files changed +43
-1
lines changed
3 files changed +43
-1
lines changed Original file line number Diff line number Diff line change 14
14
* Ensure that units for 0 is not specified
15
15
* Omit leading "0"s in values, use dot instead
16
16
*
17
- * @link https://devdocs.magento.com/guides/v2.4/coding-standards/code-standard-less.html#and-units
17
+ * @link https://devdocs.magento.com/guides/v2.4/coding-standards/code-standard-less.html#0- and-units
18
18
* @link https://devdocs.magento.com/guides/v2.4/coding-standards/code-standard-less.html#floating-values
19
19
*/
20
20
class ZeroUnitsSniff implements Sniff
Original file line number Diff line number Diff line change
1
+ // /**
2
+ // * Copyright © Magento, Inc. All rights reserved.
3
+ // * See COPYING.txt for license details.
4
+ // */
5
+
6
+ .my {
7
+ border-width : 0px ;
8
+ margin-left : 0.5rem ;
9
+ }
10
+
11
+ .foo {
12
+ border-width : 0 ;
13
+ margin-left : .5rem ;
14
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ namespace Magento2 \Tests \Less ;
7
+
8
+ class ZeroUnitsUnitTest extends AbstractLessSniffUnitTestCase
9
+ {
10
+ /**
11
+ * @inheritdoc
12
+ */
13
+ public function getErrorList ()
14
+ {
15
+ return [
16
+ 7 => 1 ,
17
+ 8 => 1 ,
18
+ ];
19
+ }
20
+
21
+ /**
22
+ * @inheritdoc
23
+ */
24
+ public function getWarningList ()
25
+ {
26
+ return [];
27
+ }
28
+ }
You can’t perform that action at this time.
0 commit comments