#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 )
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 9 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 9 years ago by
comment:3 follow-up: 13 Changed 9 years ago by
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 9 years ago by
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 9 years ago by
got a fix...
-
../build/fileUtils.js
62 62 if(segment==".." && result.length && lastSegment!=".."){ 63 63 result.pop(); 64 64 }else if(segment!="."){ 65 result.push( lastSegment=segment);65 result.push(segment); 66 66 } // else ignore "." 67 lastSegment = segment; 67 68 } 68 69 return result.join("/"); 69 70 },
comment:7 Changed 9 years ago by
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 9 years ago by
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
60 60 while(path.length){ 61 61 segment= path.shift(); 62 62 if(segment==".." && result.length && lastSegment!=".."){ 63 result.pop();63 lastSegment = result.pop(); 64 64 }else if(segment!="."){ 65 65 result.push(lastSegment= segment); 66 66 } // else ignore "."
comment:9 Changed 9 years ago by
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 9 years ago by
-
../build/fileUtils.js
61 61 segment= path.shift(); 62 62 if(segment==".." && result.length && lastSegment!=".."){ 63 63 result.pop(); 64 lastSegment = result[result.length - 1]; 64 65 }else if(segment!="."){ 65 66 result.push(lastSegment= segment); 66 67 } // else ignore "."
comment:13 Changed 9 years ago by
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]
#14108 seems related