-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Attribute selectors not replaced #33
Comments
Sorry, was meant to submit to https://github.com/JPeer264/node-rename-css-selectors but mixed up the browser tabs. |
Hi @noscript, thanks for your issue. In the examples I wanted it this way, as I ignored it as it is just used for node-rcs-core/examples/replace/index.js Lines 5 to 6 in 2a9cb39
Do you have any code to reproduce this issue? Furthermore, do you have spaces within the attribute selectors: |
Btw, it is ok that you posted it here, as this repository is the correct one 👍 |
I created a test repo https://github.com/noscript/rcs-attributes-test There are two I have some artificial .lst-dot, .lst-dash {
margin-left: 10px;
}
.board > [class*=" lst-"],
.board > [class^=lst-] {
padding: 0;
} With .r, .i {
margin-left: 10px;
}
.s > [class*=" lst-"],
.s > [class^=lst-] {
padding: 0;
} I'm not sure if such syntax is valid, but some css post-processors will remove the quotes if there was no whitespace. I will make a bug report to the relevant post-processor in that case. With .o, .u, .a, .f {
font-family: monospace;
}
.l > [class*=" msg-"],
.l > [class^="msg-"] {
padding: 10px;
} Needless to say that My expectation would be that .xo, .xu, .xa, .xf {
font-family: monospace;
}
.l > [class*=" x"],
.l > [class^="x"] {
padding: 10px;
} However I'm not sure if that is easily achievable.
Yes, there is a space on purpose. Here is why https://stackoverflow.com/a/8588532/1005230 |
Thanks for this repo. I am investigating on your issue now. |
Ok, the bug is the missing quote.
It is still valid, but I forgot to think about that case. I'll make a fix
That is true, but I wanted to achieve that with |
@noscript I got this bug removed in Regarding to your expectation for the attribute selectors. I will open another issue for that. |
I'm trying to replace some attribute selectors, for example
[class*=" cls-"]
and[class^=cls-]
. TweakingignoreAttributeSelectors
doesn't make any difference.The node-rcs-core Bootstrap example looks broken as well. Rule
[class*="col-"]
is unaffected while all othercol-*
selectors were replaced.Before:
node-rcs-core/examples/replace/before/bootstrap.css
Lines 903 to 908 in 941a636
After:
node-rcs-core/examples/replace/after/bootstrap.replaced.css
Lines 903 to 908 in 941a636
The text was updated successfully, but these errors were encountered: