So I noticed clip-path
is not supported by ie/edge. I've read a solution that will work if you convert it to using svg in the jsx instead. However this does not seem to work either.
The jsx code in app.js
import React from "react";
import "./styles.css";
export default function App() {
return (
<div className="app">
<svg width="0" height="0">
<clipPath id="myclippath" clipPathUnits="objectBoundingBox">
<polygon points="0.50 0.50, 1.00 0, 1.00 1.00, 0 1.00, 0 0" />
</clipPath>
</svg>
<div className="div-intro-bottom" />
</div>
);
}
css
/*--------------------------- Reset ---------------------------*/
html, body, div, span, applet,
object, iframe, blockquote, pre,
abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
h1 {
margin: 0;
padding: 0;
border: 0;
font-size: 3.2rem;
vertical-align: baseline;
}
h2 {
margin: 0;
padding: 0;
border: 0;
font-size: 2.4rem;
vertical-align: baseline;
}
h3 {
margin: 0;
padding: 0;
border: 0;
font-size: 1.872rem;
vertical-align: baseline;
}
h4, p, a {
margin: 0;
padding: 0;
border: 0;
font-size: 1.6rem;
vertical-align: baseline;
}
a:link {
color: (internal value);
}
a:visited {
color: (internal value);
}
a:link:active {
color: (internal value);
}
a:visited:active {
color: (internal value);
}
h5 {
margin: 0;
padding: 0;
border: 0;
font-size: 1.328rem;
vertical-align: baseline;
}
h6 {
margin: 0;
padding: 0;
border: 0;
font-size: 1.072rem;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
html,
body,
#root {
box-sizing: border-box;
-webkit-box-sizing: border-box;
margin: 0;
padding: 0;
font-family: Roboto, Arial, sans-serif;
height: 100%;
font-size: 62.5%;
min-height: 100%;
}
*, *::before, *::after {
box-sizing: inherit;
-webkit-box-sizing: inherit;
}
img {
width: 100%;
}
/*-------------------------- Desktop --------------------------*/
.div-intro-bottom {
position: absolute;
bottom: 0;
width: 100%;
height: 100%;
background-color: #ffffff;
clip-path: url(#myclippath);
/* clip-path: polygon(50% 50%, 100% 0, 100% 100%, 0 100%, 0 0); */
}
https://tukrk.csb.app/ <- works on chrome/firefox, but not on ie/edge. What am I missing?
Edge Info:
- Microsoft Edge 44.18362.449.0
- Microsoft EdgeHTML 18.18363
IE Info: Version 11
code in sandbox - https://codesandbox.io/s/clip-path-with-ieedge-support-tukrk?file=/src/App.js
I was trying the same solution as was provided here, but not having any luck: Easiest way to convert polygon clip-path to Microsoft Edge supported "clippath" svg?