Skip to content

Different results from compiling less with Grunt or with "server side compilation" #7231

Closed
@slackerzz

Description

@slackerzz

Preconditions (*)

  1. Magento 2.3.x (tried both CE and EE)
  2. Ubuntu 16.04, PHP 7.x, node v4.6.1

Steps to reproduce (*)

  1. set Magento in developer mode
  2. in the backend set css generation in "server side compilation"

While developing a custom template i found some differences between my local dev site (inside a vagrant box) and our staging server. Some css rules in the staging server are not applied, while in my dev box they work as expected. In my local environment i use grunt while in our staging server we use server side compilation.
The produced css files are different, the order in which css rules are processed is different!

So today i made some tests with a clean M2 installations and Luma theme.

Server Side compilation Grunt Diff
styles-m.css styles-m.css diff*
styles-l.css styles-l.css diff*

*on the left side of the diff you have the server side compiled css

Expected result (*)

No diff

Actual result (*)

As you can see styles-m.css is ok, there are no breaking differences between the two versions.
Sadly the two versions of styles-l.css are not equivalent, the order of the css rules in the two files is different and this can produce a different result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: FrontendComponent: CssIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions