Problem/Motivation

Stylelint is reporting the following errors in GitLab CI:

css/smart_date.css
  16:3   ✖  Expected "width" to come before "margin-right"      order/properties-order
  18:3   ✖  Expected "padding-top" to come before "text-align"  order/properties-order
  30:3   ✖  Expected "display" to come before "padding-top"     order/properties-order
  47:3   ✖  Expected "position" to come before "margin"         order/properties-order
  67:3   ✖  Expected "display" to come before "margin"          order/properties-order
  75:3   ✖  Expected "display" to come before "text-align"      order/properties-order
  76:3   ✖  Unexpected duplicate "padding-top"                  declaration-block-no-duplicate-properties
 158:3   ✖  Expected "display" to come before "margin"          order/properties-order
 185:18  ✖  Unexpected unit                                     length-zero-no-unit
 186:21  ✖  Unexpected unit                                     length-zero-no-unit
10 problems (10 errors, 0 warnings)

Steps to reproduce

Open GitLab in browser and view latest pipeline.

Proposed resolution

The reported issues are mainly ordering of styles.

When using ddev-drupal-contrip, fixes can be applied automatically with the following command: ddev stylelint --fix

Remaining tasks

Related issue #3433051: Add Gitlab CI needs to be merged first.

Then apply automatic fixes and create merge request.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Issue fork smart_date-3433214

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

lostcarpark created an issue. See original summary.

lostcarpark’s picture

I have applied stylelint fixes by running ddev stylelint --fix.

This has mostly just corrected style ordering, but there were a couple of cases of "0" being used with units, and a first-letter pseudo-class referenced without double colon.

I don't think these changes should change how anything is displayed, but it would be prudent for someone more familiar with how it should format than me to give it a quick visual inspection.

lostcarpark’s picture

Status: Active » Needs review

I've also set the stylelint check to allow_failure: false, which will prevent future CSS changes that don't pass from being merged.

Setting to "needs review".

mandclu made their first commit to this issue’s fork.

mandclu’s picture

Status: Needs review » Fixed

@lostcarpark thank you for identifying this, and for providing a fix. The only change I was concerned about was the change from one colon to two for the first-letter selector, but I was able to manually verify that everything still looks as expected. From what I understand this could present an issue for anyone on older versions of Internet Explorer, but I don't believe they should be supported at this point anyway.

Merged in, and will include in a new release shortly.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.