-
Notifications
You must be signed in to change notification settings - Fork 3k
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
svgclippaths, needs augmented documentation #213
Comments
i don't know how i came across this, but svg clipping is supported in safari (albeit obtusely) via the -webkit-mask property, and the code ends up looking like this:
so basically svgclippaths is not 'technically' a false positive, but the documentation for modernizr should maybe link to something like this so that others can figure out how to implement it in both ff/safari. |
The demo here shows this currently working across ff/safari correctly, although it requires that your svg look something like this:
so it's less than ideal because you have to recreate your clip path, but it works. also, i'm totally aware that this may seem to be a non-issue (nobody seems interested), but i'm really writing this up for 'past me' who wanted to find a way to do this and for anyone else who's trying to address this similar problem. good luck! |
additionally, resource for implementing in safari: |
thx for all the detail on this one, nsfmc.. we'll incorporate this research into the docs. |
added it to the site docs and inline docs this demo is awesome btw. i think i might blog it. |
awesome, glad it was useful. rock on,On Sat, Dec 10, 2011 at 2:23 PM, Paul Irish <
|
I realize that this issue was closed a year ago. But I believe IE9 is giving a false positive for this test when using clip-paths from an external stylesheet in this way. I am working on a project which uses code that implements the technique described above but the clip-paths (even with an -ms- prefix) do not get applied to the HTML element in IE9. Yet if you were to run a test for Modernizr.svgclippaths, IE9 will pass. This needs re-investigation. According to IE9 docs: http://msdn.microsoft.com/en-gb/ie/hh410107.aspx IE9 supports clip-paths, but this is slightly misleading as from what I can derive from my own testing is that they don't support clipping of HTML elements with SVG. I'm using Modernizr 2.6.2 at the time of testing. |
svgclippaths is a test only for clippaths in svg. and i forget, but i think its possible that svg clipping html elements On Wed, Feb 20, 2013 at 5:56 PM, Matt Fairbrass notifications@github.comwrote:
|
Oh ok, well yeah that makes sense now that I think about the way it is named. Would love to see a test for svg clipping of elements. +1 for this feature. |
if you can, spend some time to try to figure out how to test it.. maybe On Thu, Feb 21, 2013 at 9:30 AM, Matt Fairbrass notifications@github.comwrote:
|
+1 for proper detection of this feature, i am using this method on our site: http://pixeljuice.ru/en but don't know how to detect is this feature available or not.. |
@nsfmc , You are well done! God bless you) |
I just tried, with this handy test page to get a svg clipping path on html content, to no avail (although firefox does support this).
Instead, what safari does support is the svg
clipPath
command, which you can see (weirdly) here.i think maybe the documentation should be slightly changed to reflect that svgclippaths refers primarily to svg proper (or doesn't link to the mdc page on using svg clip paths to clip html content (which, admittedly, is a nifty feature))
maybe an admonition or some note on the documentation of what svgclippaths refers to basically, because it's a bit unclear at the moment.
The text was updated successfully, but these errors were encountered: