Skip to content

Commit

Permalink
refactor: changed two mixins into one border-image-repeat mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
guastallaigor committed Mar 9, 2019
1 parent 45f3deb commit c40ae05
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scss/utilities/rounded-corners-mixin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@
border-image-source: url('data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8" ?><svg version="1.1" width="5" height="5" xmlns="http://www.w3.org/2000/svg"><path d="M2 1 h1 v1 h-1 z M1 2 h1 v1 h-1 z M3 2 h1 v1 h-1 z M2 3 h1 v1 h-1 z" fill="rgb(#{red($color)},#{green($color)},#{blue($color)})" /></svg>');
}

@mixin border-image-chrome() {
@mixin border-image-repeat() {
border-image-repeat: stretch;

// for chrome
@media all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: 0.001dpcm) {
border-image-repeat: space;
}
}

@mixin border-image-ff() {
// for firefox
@supports (-moz-appearance: meterbar) {
border-image-repeat: stretch;
}
Expand All @@ -30,8 +32,7 @@
border-image-width: 3;
border-image-repeat: stretch;

@include border-image-chrome();
@include border-image-ff();
@include border-image-repeat();

@if $isDark {
@include border-image($color-white);
Expand All @@ -51,8 +52,7 @@
border-image-width: 2;
border-image-repeat: stretch;

@include border-image-chrome();
@include border-image-ff();
@include border-image-repeat();

@if $isDark {
@include compact-border-image($color-white);
Expand Down

0 comments on commit c40ae05

Please sign in to comment.