Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Custom Selectors sometimes generate unexpected output #177

Closed
awayken opened this issue Jul 2, 2015 · 2 comments
Closed

Custom Selectors sometimes generate unexpected output #177

awayken opened this issue Jul 2, 2015 · 2 comments

Comments

@awayken
Copy link

awayken commented Jul 2, 2015

I'm seeing some really unexpected behavior with custom selectors. I can't quite pinpoint what's going on, but I can provide examples that I ran through the playground to show you what's going on.

Unless I'm wrong, all four sections should render the exact selectors and rules.

cssnext:

@custom-selector :--buttons button, input[type="button"];
@custom-selector :--hover :hover, .hover;

:--buttons:--hover {
    background: color(#ff9800 shade(20%));
}

button:--hover,
input[type="button"]:--hover {
    background: color(#ff9800 shade(20%));
}

:--buttons:hover,
:--buttons.hover {
    background: color(#ff9800 shade(20%));
}

button:hover,
button.hover,
input[type="button"]:hover,
input[type="button"].hover {
    background: color(#ff9800 shade(20%));
}

Output:

button.hover,
input[type="button"]:hover,

input[type="button"].hover {
    background: rgb(204, 122, 0);
}


button.hover,
input[type="button"]:hover,

input[type="button"].hover {
    background: rgb(204, 122, 0);
}


input[type="button"]:hover,
button.hover,

input[type="button"].hover {
    background: rgb(204, 122, 0);
}

button:hover,
button.hover,
input[type="button"]:hover,
input[type="button"].hover {
    background: rgb(204, 122, 0);
}
@topaxi
Copy link

topaxi commented Jul 2, 2015

Duplicate of #163 and csstools/postcss-custom-selectors#19

@MoOx
Copy link
Owner

MoOx commented Jul 3, 2015

Please follow #163 indeed.

@MoOx MoOx closed this as completed Jul 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants