I am using inline svg in clip-path to achieve a beveled corner effect on my container. Below is the code i am using right now
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
.clip-svg {
width: 0;
height: 0;
}
.clip-polygon {
-webkit-clip-path: url("#clip-svg-demo");
clip-path: url("#clip-svg-demo");
}
</style>
</head>
<body>
<div class="clip-wrap">
<img src="http://leisureleaguesfranchise.com/wp-content/uploads/2014/09/football2.jpg" alt="demo-clip-path" width="100px" height="100px" class="clip-polygon">
<img src="http://leisureleaguesfranchise.com/wp-content/uploads/2014/09/football2.jpg" alt="demo-clip-path" width="400px" height="400px" class="clip-polygon">
</div>
<svg display="none;">
<defs>
<clipPath id="clip-svg-demo" clipPathUnits="objectBoundingBox">
<polygon points="0,0 1,0 1,0.8 0.8,1 0,1" />
</clipPath>
</defs>
</svg>
</body>
</html>
The issue i am facing is the svg shape that is used for clipping is responsive. As the size of my container increases the svg shape increases in size and hence the beveled cut at the bottom right corner also increases in length.
What i want is that the length of cut remain the same irrespective of the dimensions of my container on which clip-path property is applied.
In my code i specify the points of polygon relatively according to the coordinate system. I know that we can specify points absolutely in terms of pixels but that will make it a fixed size shape which may not fit perfectly into a container bigger or smaller than the svg shape dimensions.
What i needed to find out if it is possible to have both relative as well as absolute dimensions in polygon points at the same time such that the cut dimensions remain the same but the overall polygon size is responsive.
EDIT I posted this question which has the exact same problem earlier but the answers there do not completely serve my requirement. I created this new thread as i wanted to get more help on one particular solution that i am trying right now (i.e clip path)