mirror of
https://github.com/nostalgic-css/NES.css.git
synced 2025-08-16 03:14:00 +02:00
refactor: changed two mixins into one border-image-repeat mixin
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
|
Reference in New Issue
Block a user