Skip to content

Support for nested items #202

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

Merged
merged 2 commits into from
Dec 22, 2015
Merged

Conversation

lemieux
Copy link
Contributor

@lemieux lemieux commented Dec 8, 2015

This allows value like -webkit-image-set(url('some-url.png') 1x, url('some-other-url.png') 2x) to be parsed and transformed the by loader.

It fixes #200.

delete item.innerSpacingAfter;
var url;

if(isValue) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what reason is isValue tracked?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it should be named differently, but it's basically to reuse the same processNode logic on nested properties... should probably be named isNested

@sokra
Copy link
Member

sokra commented Dec 21, 2015

please fix the spacing. It should be tabs.

delete item.innerSpacingAfter;
var url;

if(isValue) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isValue is always true here, because a nested item has this representation:

{
    type: "nested-item",
    name: name,
    nodes: [
        { type: "value", nodes: [...] }
    ]
}

So I think you could remove this check here and always use the true case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using the true case makes the background img 2 test and the font face tests fail.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember correctly, it was because in the case where it's processing a value, the urls in it were not transformed.

@sokra sokra merged commit 184810d into webpack-contrib:master Dec 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSS loader not extracting path in -webkit-image-set
2 participants