Skip to content
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.

Renaming can rename to a class already used #46

Closed
iflan opened this issue Oct 23, 2015 · 2 comments
Closed

Renaming can rename to a class already used #46

iflan opened this issue Oct 23, 2015 · 2 comments
Assignees

Comments

@iflan
Copy link
Member

iflan commented Oct 23, 2015

Originally reported on Google Code with ID 27

What steps will reproduce the problem?
1. pick a stylesheet
2. somewhere in that stylesheet put a class called 'a'
3. put a in --exluded-classes-from-renaming

What is the expected output? What do you see instead?

it is expected that no class will be renamed to 'a' as it is already in use

What version of the product are you using? On what operating system?

the latest

Please provide any additional information below.

came across this when adblock was hiding our site because 'body' was being renamed
to 'Ad' which was in the filters. Tried creating a class called 'Ad' but that was being
renamed and body was still 'Ad' so added it to the exclude renaming but would be worse
as 'body' was still 'Ad' and now we have two class definitions for 'Ad'


Reported by rhysbrettbowen on 2012-08-31 21:02:46

@iflan
Copy link
Member Author

iflan commented Oct 26, 2015

@rhysbrettbowen, sorry it has taken so long, but I will investigate. I was sure this was working with the --excluded_classes_from_renaming flag.

@iflan
Copy link
Member Author

iflan commented Jun 7, 2016

I think this is a documentation bug. You need to put the class that you want to rename in the --excluded-classes-from-renaming.

For example:

.oooo {
  background: blue;
}

.qqqqqqqq {
  color: pink;
}

run as:

$ java -jar ../closure-stylesheets/build/closure-stylesheets.jar --rename CLOSURE test-bug-46.gss 

produces:

.a{background:blue}.b{color:pink}

while:

$ java -jar ../closure-stylesheets/build/closure-stylesheets.jar --excluded-classes-from-renaming qqqqqqqq --rename CLOSURE test-bug-46.gss

produces:

.a{background:blue}.qqqqqqqq{color:pink}

@iflan iflan closed this as completed Jun 7, 2016
@iflan iflan added the invalid label Jun 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant