Problem/Motivation

ES6 in CORE introduced a build process into CORE. Additional, we also using Stylelint to lint our CSS. NODEJS became a must in the CORE Development.

In the past day, #1310698: Add a CSS preprocessor library to core suggested adding CSS preprocessor to Drupal CORE Backend. However, the non-official PHP compiler always has buggy. And it's an old-fashioned development way in modern PHP development. And I believed we all left comments over there has different new thoughts also.

To optimize the frontend workflow in 2017 and the future, I suggested introducing more NODEJS FRONTEND Tools into DRUPAL CORE Development.

Proposed resolution

  • Use PostCSS autoprefixer
    Patching broswer vendor automactailly. No more human work: #2492335: Drop more browser specific prefixes
  • Use SCSS ( https://github.com/sass/libsass )
    I suggested to keep it simple at the beginning. We need not convert every CSS files to SCSS syntax (, or creates many SCSS style rules). For example,
    -- just enabled Custom Properties to keep our CSS more consistency. More easy to override from contribs. e.g. change whole color theme
    -- then adding common @mixins
    (We could learn from Bootstrap)
  • ( auto RTL tool )
  • (You name it)

OLD SUMMARY:
------------
There was a post #1310698: Add a CSS preprocessor library to core proposes to add CSS preprocessor library to CORE BACKEND. But the non-official PHP Compiler always lack behind the development and with buggy.

The post #1310698: Add a CSS preprocessor library to core proposes add CSS preprocessor library to CORE BACKEND. But non-official PHP Compiler always lack behind development and with buggy.

In this post, we focus on just move SCSS (and NODEJS build tool) into Development Stage.

Comments

droplet created an issue. See original summary.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Jeff Burnz’s picture

I don't understand the issue or how the Proposed resolution relates to the issue. Are you saying we convert all of cores CSS to SCSS, or that we just add something to package.json etc?

droplet’s picture

Convert all CSS to SCSS.

Jeff Burnz’s picture

An argument in the past has always been that SCSS/SASS would reduce core dev/themer participation, I always argued that it's the other way around since every front ender is using preprocessing these days, no one actually writes CSS anymore, do they?

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

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.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: Active » Closed (duplicate)

We'd need to write guidelines around writing SCSS to prevent people from those nasty habits like over nesting and fragmented selectors between files no? I use SCSS daily but not sure this is a great idea for core, anyways this needs a bit more thought put into it.

Also looks like a duplicate of #1310698: Add a CSS preprocessor library to core which does have a lot of discussion and thought put in already.

droplet’s picture

Issue summary: View changes
droplet’s picture

Title: Use SCSS in Core Development » [META] Optimize Frontend Workflow in Core Development
Issue summary: View changes
Status: Closed (duplicate) » Active

I re-open this issue with a more clear idea. SCSS isn't the only thing I wanted to push here.

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

Category: Task » Plan

@droplet what would you like to do with this?

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

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should 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.

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

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should 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.

andypost’s picture

If you gonna use autoprefixer (which is postCSS) then no reason to add sass/less

andypost’s picture

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

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.

anruether’s picture

Can this be closed as outdated? See CR: Drupal core using PostCSS for development | Drupal.org

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.

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

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.