-
-
Notifications
You must be signed in to change notification settings - Fork 608
feat: add IE filter support (AlphaImageLoader
)
#638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,6 +97,20 @@ var parserPlugin = postcss.plugin("css-loader-parser", function(options) { | |
item.nodes.forEach(processNode); | ||
break; | ||
case "item": | ||
if (item.name.indexOf('progid:DXImageTransform.Microsoft.AlphaImageLoader') >= 0){ | ||
delete item.innerSpacingBefore; | ||
delete item.innerSpacingAfter; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
var matchSrc = item.name.match(/src=['"]([^'"]+)['"]/); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
if (!matchSrc) break; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
var srcUrl = matchSrc[1]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
if (options.url && !/^#/.test(srcUrl) && (isAlias(srcUrl) || loaderUtils.isUrlRequest(srcUrl, options.root))) { | ||
item.name = item.name.replace(srcUrl, "___CSS_LOADER_URL___" + urlItems.length + "___"); | ||
urlItems.push({ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
url: srcUrl | ||
}); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
break; | ||
} | ||
var importIndex = imports["$" + item.name]; | ||
if (typeof importIndex === "number") { | ||
item.name = "___CSS_LOADER_IMPORT___" + importIndex + "___"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment (in brief) here, describing what the following code/case is doing