WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] downloaded theme files from FTP are double line spaced (9 posts)

  1. jcyl29
    Member
    Posted 5 years ago #

    I use GlobalSCAPE and FileZilla for my FTP software. Whenever I download my theme files from my hosting server, for example, the style.css file, the result is that WordPress adds line breaks so that my file looks double line spaced. For example, if my style file was just:

    .style1 {
    	color: #FF0000;
    	font-style: italic;
    	font-weight: bold;
    }

    Then when I download it and open it, it looks like:

    .style1 {
    
    	color: #FF0000;
    
    	font-style: italic;
    
    	font-weight: bold;
    
    }

    Has anyone experienced this problem?

  2. ClaytonJames
    Member
    Posted 5 years ago #

    It would surprise me if WordPress had anything to do with the line spacing. What application are you using to actually open and edit the downloaded style sheet? Perhaps the options set in your text editor are causing the issue.

  3. jcyl29
    Member
    Posted 5 years ago #

    I'm using Dreamweaver. I'd created websites before w/o wordpress and this kind of spacing issue has never happens with those sites

  4. Mark / t31os
    Moderator
    Posted 5 years ago #

    I use Filezilla and don't have this problem. Thought it worth a mention..

  5. night2008
    Member
    Posted 4 years ago #

    It's caused by downloading linebreaked files from Unix to Windows (most-likely) whereas Unix files are single spaced (CR) while on windows double spaced (CR LF).

    When converting these while downloading your files from FTP, this results in a line breaking of CR CR LF which causes the double spacings.

    You could

    1. Convert all double spacing to single spacing using TextPad (extra -> convert to single spacing)

    2. Download the files from FTP using BINARY transfer mode (which does not change anything)

    Happy coding!

    Kim

  6. night2008
    Member
    Posted 4 years ago #

    PS: I also just encountered this issue whilest downloading a copy of a production website ;-) Try changing 6000 php files with double line-breaks... The easiest solution is thus downloading as BINARY!

  7. night2008
    Member
    Posted 4 years ago #

    PS2: This isn't a WP problem (how could it...WP = perfect!)

  8. jcyl29
    Member
    Posted 4 years ago #

    wow it's been a while since i checked this thread, i will definitely look into this, thank you!

  9. jcyl29
    Member
    Posted 4 years ago #

    WP is far from perfect, but your tip worked. No more annoying double spacing!

Topic Closed

This topic has been closed to new replies.

About this Topic