Fix for CSS has() or is() selector

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
AlexFox
Sr. Propeller Head
Posts: 265
Joined: Thu Oct 19, 2017 1:56 am

Fix for CSS has() or is() selector

Post by AlexFox »

This is a simple post build task that will fix Flare replacing commas in certain CSS selectors with Unicode, breaking the CSS.

Code: Select all

set filePath="$(OutputDirectory)\resources\stylesheets\styles.css"
powershell -Command "(Get-Content '%filePath%') -replace '\\00002C\\000020', ', ' | Set-Content '%filePath%'"
This will look at the default styles.css stylesheet in the typical location. My targets use lowercase filenames so you may need to adjust if yours do not.

Just paste this code into your Post-Build Event Command window and the CSS should be fixed!
Post Reply