Problem/Motivation

Follow-up to #2865971: Use stylelint as opposed to csslint in core. Configure the selector-pseudo-element-colon-notation to be consistent with https://www.drupal.org/docs/develop/standards/css/css-coding-standards

Proposed resolution

Brief instructions on running stylelint - you'll need npm...

All the commands below take place in DRUPAL_ROOT/core
To install stylelint

npm install

This will install Drupal 8's npm dependencies of which stylelint is one.

To run it on all core css files. Apply this issue's patch and do the following command from DRUPAL_ROOT/core

npm run lint:css

Remaining tasks

User interface changes

None

API changes

None

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Mukeysh’s picture

Status: Active » Needs review
FileSize
3.52 KB

Added patch for this.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

joelpittet’s picture

Version: 8.4.x-dev » 8.5.x-dev
Issue tags: +Needs reroll
themes/bartik/css/components/node-preview.css
 64:36  ✖  Expected single colon pseudo-element notation   selector-pseudo-element-colon-notation

Looks like some new errors snuck in during the time it took to review, sorry about that.

joelpittet’s picture

Status: Needs review » Needs work
harsha012’s picture

Status: Needs work » Needs review
FileSize
3.67 KB

re-rolled the patch

joelpittet’s picture

Thanks @harsha, looking at this closer this looks wrong, :: is the standard we should be using.

I think we should be following the CSS3 spec and it is supported in our supported browsers.
https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements

I propose:
pseudo-element = double
pseudo-selector = single

joelpittet’s picture

Status: Needs review » Needs work

More like needs discussion but maybe NW is appropriate?

jofitz’s picture

Issue tags: -Needs reroll

Removed Needs Reroll tag.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

joelpittet’s picture

Status: Needs work » Needs review

Thought's on #8?

occupant’s picture

@joelpittet Agreed about following the spec.

Rerolling patch with active lint rule set to:
"selector-pseudo-element-colon-notation": "double"

codexmas’s picture

Status: Needs review » Reviewed & tested by the community

#13 applied cleanly.

Output from linting command:

core 12:45:48 > npm run lint:css

> Drupal@ lint:css /Users/username/GIT/drupal/core
> stylelint "**/*.css" || exit 0
leahtard’s picture

I agree with the standard @joelpittet mentions in #8:

pseudo-element = double
pseudo-selector = single

The patch applied cleanly and passed the linter like @codexmas mentioned.

Cheers, Leah

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 13: 2866822-13.patch, failed testing. View results

joelpittet’s picture

Status: Needs work » Reviewed & tested by the community

Unrelated testbot failure, resetting status. Thanks for the reviews @codexmas and @leahtard

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

We still need to actually make this the standard - which means we need coding standards issue and agreement with the technical working group and then update the standard and then implement the patch.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

longwave’s picture

Status: Needs work » Closed (duplicate)

Duplicate of #3343212: Update Core CSS to use double-colon for pseudo elements which is currently active - transferred credit over there.