CodeKit icon indicating copy to clipboard operation
CodeKit copied to clipboard

Override remote CSS files with local copies doesn't support `../` in path

Open stefenphelps opened this issue 6 years ago • 3 comments

Quick, short summary: Trying to use the external server option to override remote CSS files with local copies but it Codekit doesn't seem to work when the root of the website is located in a subdirectory and the CSS file is being called with a ../ in the link tag.

Expected results: The local CSS file should override the external file and I can see the style changes live

Actual results: The local CSS file does nothing to the external site.

Exact steps to reproduce:

  1. Set the following site as the external server address https://lightning.mycartssl.com/
  2. Download the CSS file located at https://lightning.mycartssl.com/assets/design/STKE_WP_Theme_B/design.css
  3. Create a project folder then copy the CSS file to the following local path /assets/design/STKE_WP_Theme_B/design.css

stefenphelps avatar Nov 21 '19 17:11 stefenphelps

What have you set the Browser Refresh Delay to in Project Settings > Browser Refreshing?

bdkjones avatar Nov 23 '19 02:11 bdkjones

Um, that question made no sense because Apple Mail threaded the GitHub email for this topic with another topic from 2014 that was completely different. Sorry about that.

Yea, so this is definitely a limitation currently. CodeKit looks at the path in the <link> element to match the remote CSS file with a local one to use as an override. There's currently no way to customize that because the UI to do so would be cumbersome. If you can eliminate the ../, things should work as expected.

bdkjones avatar Nov 23 '19 02:11 bdkjones

I just discovered that CodeKit doesn't like spaces in file paths or file names either. That was driving me crazy.

bengoshow avatar Oct 27 '20 15:10 bengoshow