Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #32671 -- Fix CSS var() + relative url() issue in Safari. #14294

Closed
wants to merge 1 commit into from
Closed

Fixed #32671 -- Fix CSS var() + relative url() issue in Safari. #14294

wants to merge 1 commit into from

Conversation

perry
Copy link
Contributor

@perry perry commented Apr 21, 2021

There is a bug in Safari where using the var() property alongside a url() that contains a relative path, the relative path will break. The bug also existed in Chrome (​https://bugs.chromium.org/p/chromium/issues/detail?id=618165), which has been fixed. However the Safari bug still exists as of Mac OS 11.2.3.

Expected Output

Screen Shot 2021-04-21 at 17 23 26

Actual Output

Screen Shot 2021-04-21 at 17 23 17

Screen Shot 2021-04-21 at 17 24 27

As you can see from the console, the URLs end up being relative to the current page URL, not the CSS file URL in which they are loaded.

This bug was introduced in ​0a80223

Related Trac:
https://code.djangoproject.com/ticket/32671

@claudep
Copy link
Member

claudep commented Apr 21, 2021

As a regression test is difficult to add here, I would add a comment in the CSS file linking to this issue, otherwise someone else could come later and propose a patch to regroup the "doubled" background lines.

@perry
Copy link
Contributor Author

perry commented Apr 21, 2021

@claudep good suggestion, I have added that.

@carltongibson carltongibson changed the title Fix CSS var() + relative url() issue in Safari. Fixed #32671 -- Fix CSS var() + relative url() issue in Safari. Apr 22, 2021
@carltongibson
Copy link
Member

Closing as per ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants