Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1044371

    Hi!
    I’ve got a problem with the css performance compression option. I’m defining clip paths in an inline svg, which gets placed in the beginning after the body tag by my child theme. When I want to use the svg clip paths in my design I’m adding this to my quick css:

    .avia-section.projects:before {
      clip-path: url(#above);
      -webkit-clip-path: url(#above);
    }
    .avia-section.projects:after {
      clip-path: url(#below);
      -webkit-clip-path: url(#below);
    }

    The outcome in the frontend sadly looks like this:

    .avia-section.projects:before {
        clip-path: url(https://example.com/wp-content/uploads/dynamic_avia/#above);
        -webkit-clip-path: url(https://example.com/wp-content/uploads/dynamic_avia/#above);
    }
    .avia-section.projects:after {
        clip-path: url(https://example.com/wp-content/uploads/dynamic_avia/#above);
        -webkit-clip-path: url(https://example.com/cms/wp-content/uploads/dynamic_avia/#above);
    }

    Is there a way to deactivate that path replacement for the quick css? Or is there a way to deactivate the compression just for the quick css? I just need a place where no url path gets replaced by the compression.

    Thanks a lot in advance for your help!

    #1044809

    Hey fresewolff,

    Why don’t you use the full URL in the CSS instead?

    http://your.site/#anchor

    Best regards,
    Rikard

    #1044819

    Moin Rikard!

    Thanks for your answer. I think I’ve left my brain at home yesterday. I forgot to add single quotes around the full URL.
    For any other developer struggling with that problem:

    clip-path: url('http://example.com/#above')

    is working.

    Thanks for your advise and greetings from Germany!

    #1045166

    Hi,

    I do that myself all the time :D

    Glad you got it working and thanks for sharing your solution, please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

    #1045208

    Hey!
    You can close it, it’s working great!

    #1045575

    Hi,

    Thanks for letting us know, I’ll close this for now then. Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘css url replacement in quick css’ is closed to new replies.