Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#14128 closed defect (fixed)

Some CSS cascading import url() not processed well after build

Reported by: Evan Owned by: Rawld Gill
Priority: high Milestone: 1.7
Component: BuildSystem Version: 1.7.0b1
Keywords: build, css, import, Cc: Rawld Gill, Adam Peller
Blocked By: Blocking:

Description (last modified by Evan)

Just came across this issue when dealing with #14110. Not sure if it's a more general issue in our util/build.

EnhancedGrid.css imports content from claroGrid.css, and there are some css attributes referring to resources in dijit/dojo e.g

.claro .dojoxGridExpandoLoading .dojoxGridExpandoNode {
  background-image: url('../../../dijit/themes/claro/images/loadingAnimation.gif');
}

After built, all the content in claroGrid.css are pulled into EnhancedGrid.css, but the above refering path is wrongly changed to

.claro .dojoxGridLoading {
  background-image:url(../dijit/themes/claro/images/loadingAnimation.gif);
}

The expected result should be

.claro .dojoxGridLoading {
  background-image:url(../../../../../dijit/themes/claro/images/loadingAnimation.gif);
}

The incorrect converted patch can be found in either 1.7RC1 or nightly build by searching keyword ".claro .dojoxGridLoading"

So this results in some test pages not working well under dojox/grid/ due to the missed icon resources.

Change History (13)

comment:1 Changed 8 years ago by Evan

Description: modified (diff)

comment:2 Changed 8 years ago by ben hockey

#14108 seems related

comment:3 Changed 8 years ago by ben hockey

fyi - while looking at this i found that there is an url for .claro .dojoxGridMasterHeader in the source dojox/grid/resources/claroGrid.css that doesn't point to an existing image - ../../../resources/images/header.png

comment:4 Changed 8 years ago by ben hockey

there is a problem with fileUtils.compactPath where the following occurs:

fileUtils.compactPath("../../../resources/../../../dojo/resources/images/dndNoCopy.png");

// produces

'../dojo/resources/images/dndNoCopy.png'

// should be

'../../../../../dojo/resources/images/dndNoCopy.png'

comment:5 Changed 8 years ago by ben hockey

got a fix...

  • ../build/fileUtils.js

     
    6262                               if(segment==".." && result.length && lastSegment!=".."){
    6363                                       result.pop();
    6464                               }else if(segment!="."){
    65                                        result.push(lastSegment= segment);
     65                                       result.push(segment);
    6666                               } // else ignore "."
     67                               lastSegment = segment;
    6768                       }
    6869                       return result.join("/");
    6970               },
Last edited 8 years ago by ben hockey (previous) (diff)

comment:6 Changed 8 years ago by ben hockey

... but this introduces other problems.

comment:7 in reply to:  6 Changed 8 years ago by Rawld Gill

Replying to neonstalwart:

... but this introduces other problems.

What else are you seeing;

Your fix looks fine. This is what is in dojo.js...somehow that code didn't make it here.

comment:8 Changed 8 years ago by ben hockey

if you went with the other patch and checked the output file release/dojo/dojox/grid/enhanced/resources/claro/EnhnacedGrid.css it didn't inline it's import. i've fixed it now though - just this patch on its own:

  • ../build/fileUtils.js

     
    6060                       while(path.length){
    6161                               segment= path.shift();
    6262                               if(segment==".." && result.length && lastSegment!=".."){
    63                                        result.pop();
     63                                       lastSegment = result.pop();
    6464                               }else if(segment!="."){
    6565                                       result.push(lastSegment= segment);
    6666                               } // else ignore "."

comment:9 Changed 8 years ago by ben hockey

aargh... i need to quit rushing this - just do what's in dojo.js. everything else i've said so far is not completely right :)

comment:10 Changed 8 years ago by ben hockey

  • ../build/fileUtils.js

     
    6161                               segment= path.shift();
    6262                               if(segment==".." && result.length && lastSegment!=".."){
    6363                                       result.pop();
     64                                       lastSegment = result[result.length - 1];
    6465                               }else if(segment!="."){
    6566                                       result.push(lastSegment= segment);
    6667                               } // else ignore "."

comment:11 Changed 8 years ago by Rawld Gill

Resolution: fixed
Status: newclosed

In [26899]:

fixed compact path to look like dojo.js; fixes #14128; !strict

comment:12 Changed 8 years ago by Evan

In [26900]:

Refs #14128 - fix 1 line of incorrect icon refer in dojox/grid/resources/claroGrid.css

comment:13 in reply to:  3 Changed 8 years ago by Evan

Replying to neonstalwart:

fyi - while looking at this i found that there is an url for .claro .dojoxGridMasterHeader in the source dojox/grid/resources/claroGrid.css that doesn't point to an existing image - ../../../resources/images/header.png

Thanks Ben! And it's fixed with [26900]

Note: See TracTickets for help on using tickets.