HOW it WAS
The old generator was working this way:
- Fetching Colors and Percentages then place them in arrays.
- Inserting CSS rules directly inside a style sheet:
- Editing these CSS rules using:
- Then I display all these rules by going through a loop.
The problem I faced is that Blogger uses a different number of style sheets in each browser, and working this way, I was mixing my own CSS styles with Blogger's own CSS styles, so it was difficult to know the position of my generated rules.
The best workaround I found was to create my own style sheet.
Then I could manipulate CSS styles using:
I no longer need to know the index of the style sheet, I can call it directly using the ID, and I just had to add the sheet property.