WordPress.org

Ready to get started?Download WordPress

Forums

Combine CSS
[resolved] Copy Stylesheet Assets to Combine Folder (6 posts)

  1. pha3z
    Member
    Posted 1 year ago #

    Negative side-effect of combine:

    URL() references in the stylesheet break if they are relative to the stylesheet. Example: Revolution Slider plugin comes with its own PNG shadows and a dynamically generated stylesheet that displays a shadow user-chosen shadow below the slider. Combine did a perfect job of including the stylesheet in the Combined file, but the URL reference to the shadow PNG is invalidated so the browser look in the wrong place for the shadow.

    Proposed Solution A:
    Parse URL() references and copy the assets to folder where combined CSS file is saved.

    Proposed Solution B:
    Intelligently, modify URL() references in combined sheet to correctly reference the location of the assets relative to the combined sheet location.

    Thoughts?

    http://wordpress.org/extend/plugins/combine-css/

  2. pha3z
    Member
    Posted 1 year ago #

    In retrospect, Solution A is prone to problems. If a given stylesheet is referencing assets at a higher level directory or a sibling directory, then you can't just copy the assets into the combine directory with the new stylesheet. Since this situation is highly likely to occur for some plugins or themes, Solution B would be far more elegant.

    How difficult do you think it'd be to accomplish this?

  3. timmcdaniels
    Member
    Plugin Author

    Posted 1 year ago #

    Solution B should be possible. I will take a look this evening and over the weekend. I will be back in touch soon!

  4. timmcdaniels
    Member
    Plugin Author

    Posted 1 year ago #

    Hello pha3z,

    I just released version 0.4, and it addresses your issues. There are a number of other changes to the plugin as well (please review change log). Please let me know if this helps with your issues.

    Thanks,

    Tim

  5. pha3z
    Member
    Posted 1 year ago #

    Woot! It appears to work seamlessly! I updated the plugin and now the images show up! The architecture changes sounds like smart moves as well! Terrific work!

    Thanks,
    Jim

  6. timmcdaniels
    Member
    Plugin Author

    Posted 1 year ago #

    resolved.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.