-
Notifications
You must be signed in to change notification settings - Fork 44
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
The demo doesn't show any angled edges on Firefox #2
Comments
Likewise for FF47 and FF dev edition v48 on OS X. |
This is caused by using hex for the fill rather than rgb, I encountered the same issue when I wrote about the subject back in 2014. You could convert the fill color to rgb quite simply by breaking it up in to it's component red/green/blue parts and then assembling it again as $red: red($color);
$green: green($color);
$blue: blue($color);
fill="rgb($red, $green, $blue)" |
Alternatively, percent encoding the It is well known and the report has been deemed invalid. |
Thanks @omgmog. This does fix Firefox, however just noticing now it breaks the use of color functions such as @include angled-edge('outside bottom','lower right', darken(#EE3924,5%)); decoded outputs to: <svg xmlns='http://www.w3.org/2000/svg' height="100" width="1500" fill="rgb(230.59958,40.01271,17.90042)" fill-opacity="1"><polygon points="0,0 1500,0 0,100"></polygon></svg> |
Hmm that seems like a quirk of Sass in that case -- Do you see the same issue if you first assign your |
Same issue assigning to variable first. Hmm. |
Alright I've had a play with this in both Sass and Libsass, and it only happens in Libsass. Demo here: http://www.sassmeister.com/gist/e9eeb2187e81f24da7afe8d7ad17c4a2 If you change the Compiler in the "Options" dropdown, and make a small code change, you can validate the difference between Sass and Libsass |
I was also just playing around with it here http://www.sassmeister.com/gist/b3574a75b09f94c4d29a70142c7a1714 |
You could wrap each of the calls to |
Perfect. Thanks for your assistance on this. |
I've seen this break when trying to pass a CSS color variable in:
For @include angled-edge('outside bottom', 'lower right', var(--primary)); |
@easherma When compiling from SCSS to CSS that |
Is there a workaround to allow for that kind of usage? |
In short -- no. This mixin generates an SVG background image dynamically, you could probably replicate that behavior with a bit of JavaScript if you wanted it to be dynamically associated with a CSS Take a look at the source of the mixin or the generated CSS on the demo |
I just tried to view the demo on Firefox (46, on linux) and nothing shows up, as the screenshot shows.
Inspect says "cannot load image" when you hover over the url, but that could just be a normal thing for data urls.
The text was updated successfully, but these errors were encountered: