Skip to content

Commit

Permalink
Supported cross-browser border-radius for modern browsers.
Browse files Browse the repository at this point in the history
  • Loading branch information
harryjoy committed Feb 13, 2014
1 parent a87d35a commit 757dcc5
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 13 deletions.
2 changes: 1 addition & 1 deletion dist/premage.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/premage.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 32 additions & 11 deletions src/css/premage.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@CHARSET "ISO-8859-1";
.preview-image {
/*border: 1px solid #CDCDCD;*/
width: 64px;
height: 64px;
}
Expand All @@ -15,19 +14,41 @@
.preview-image-left {
float: left;
}
.preview-image-square{}
.preview-image-round{border-radius: 50%;}
.preview-image-ellipse{border-radius: 25%;}
.preview-image-square-round{border-radius: 5px}
.preview-image-leaf-left{
border-top-left-radius: 25px;
.preview-image-square {}
.preview-image-round {
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
}
.preview-image-ellipse {
-webkit-border-radius: 25%;
-moz-border-radius: 25%;
border-radius: 25%;
}
.preview-image-square-round {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px
}
.preview-image-leaf-left {
-webkit-border-radius: 25px;
-webkit-border-top-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius: 25px;
-moz-border-radius-topright: 5px;
-moz-border-radius-bottomleft: 5px;
border-radius: 25px;
border-top-right-radius: 5px;
border-bottom-right-radius: 25px;
border-bottom-left-radius: 5px;
}
.preview-image-leaf-right{
border-top-left-radius: 5px;
.preview-image-leaf-right {
-webkit-border-radius: 5px;
-webkit-border-top-right-radius: 25px;
-webkit-border-bottom-left-radius: 25px;
-moz-border-radius: 5px;
-moz-border-radius-topright: 25px;
-moz-border-radius-bottomleft: 25px;
border-radius: 5px;
border-top-right-radius: 25px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 25px;
}
2 changes: 2 additions & 0 deletions src/js/premage.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,8 @@
case 'square-round':
elem.addClass('preview-image-square-round');
elem.css('border-radius', shape.roundness);
elem.css('-webkit-border-radius', shape.roundness);
elem.css('-moz-border-radius', shape.roundness);
break;
case 'leaf-left':
elem.addClass('preview-image-leaf-left');
Expand Down

0 comments on commit 757dcc5

Please sign in to comment.