Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS compass sprite with wordpress wrong path

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #42493
    skshah
    Member

    I am using compass and sass for my wordpress project where the css file style.css is sibling to images folder. But the relative path isn’t seem to be working here. I am missing all the images that has been created with sprite.
    I am trying since a 2 days and still no solution.
    Any help will be greatly appreciated.

    #123404
    Paulie_D
    Member

    We’d need to see a link to the site.

    #123407
    skshah
    Member
    #123408
    skshah
    Member

    you can see that the paths are in the format of “../images/spr-s33303ddf86.png”

    but i want in
    “images/spr-s33303ddf86.png”

    #123416
    skshah
    Member

    relative_assets are in true, so the format is in the form of “../images/” but my images folder and css file style.css is sibling to each other so i need a path format like “images/” without ../ you see? ..

    #123420
    skshah
    Member

    its set to images_dir = “images”
    please help me. its a common wordpress format and it shouldn’t so hard…

    #123429
    skshah
    Member

    actually am working in localhost. How can i show you my config.rb codes can give me any idea.

    #123437
    skshah
    Member
    #123440
    skshah
    Member

    Your are awsome. Thanks :) a very very very thanks. The below code was moving the style.css from its css directory to one step back. I removed the code and change the css_dir to ‘.’ ITS FIXED . Thank you again.. :)
    I set it up by myself. i found a post on css-tricks.

    require ‘fileutils’
    on_stylesheet_saved do |file|
    if File.exists?(file) && File.basename(file) == “style.css”
    puts “Moving: #{file}”
    FileUtils.mv(file, File.dirname(file) + “/../” + File.basename(file))
    end
    end

    But Would you mind telling me how to mark it as solved. :(

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘CSS’ is closed to new topics and replies.