1
0
mirror of https://github.com/nostalgic-css/NES.css.git synced 2025-08-30 17:30:23 +02:00

Merge pull request #319 from nostalgic-css/fix-border-bugs-on-chrome

fix: fix borders bugs on chrome without breaking in firefox
This commit is contained in:
ダーシノ
2019-03-09 12:55:52 +09:00
committed by GitHub

View File

@@ -11,12 +11,27 @@
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-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;
}
// for firefox
@supports (-moz-appearance: meterbar) {
border-image-repeat: stretch;
}
}
@mixin rounded-corners($isDark: false) {
@extend %rounded-corner-defaults;
border-image-slice: 3;
border-image-width: 3;
border-image-repeat: stretch;
@include border-image-repeat();
@if $isDark {
@include border-image($color-white);
@@ -34,7 +49,8 @@
border-image-slice: 2;
border-image-width: 2;
border-image-repeat: stretch;
@include border-image-repeat();
@if $isDark {
@include compact-border-image($color-white);