GitLab CI - Stylelint fixes

Created on 23 March 2024, about 1 year ago
Updated 7 April 2024, 12 months ago

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 📌 Add Gitlab CI Fixed 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

📌 Task
Status

Fixed

Version

4.1

Component

Code

Created by

🇮🇪Ireland lostcarpark

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @lostcarpark
  • Merge request !90Atuomatic stylelint fixes. → (Merged) created by lostcarpark
  • Pipeline finished with Success
    about 1 year ago
    Total: 174s
    #127631
  • Pipeline finished with Success
    about 1 year ago
    Total: 153s
    #127641
  • 🇮🇪Ireland lostcarpark

    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.

  • Status changed to Needs review about 1 year ago
  • 🇮🇪Ireland lostcarpark

    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".

  • Pipeline finished with Skipped
    about 1 year ago
    #127707
  • First commit to issue fork.
  • Status changed to Fixed about 1 year ago
  • 🇨🇦Canada mandclu

    @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.

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

Production build 0.71.5 2024