File tree Expand file tree Collapse file tree 3 files changed +43
-1
lines changed Expand file tree Collapse file tree 3 files changed +43
-1
lines changed Original file line number Diff line number Diff line change 1414 * Ensure that units for 0 is not specified
1515 * Omit leading "0"s in values, use dot instead
1616 *
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
1818 * @link https://devdocs.magento.com/guides/v2.4/coding-standards/code-standard-less.html#floating-values
1919 */
2020class 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