Commit 7c0ba229 by zhengxiao

feat: 新在样式兼容前缀适配

parent 572c5b23
...@@ -15,8 +15,15 @@ ...@@ -15,8 +15,15 @@
"retain.min.css" "retain.min.css"
], ],
"browserslist": [ "browserslist": [
"> 3%", "ie >= 8",
"last 2 versions" "ie_mob >= 10",
"ff >= 26",
"chrome >= 30",
"safari >= 6",
"opera >= 23",
"ios >= 5",
"android >= 2.3",
"bb >= 10"
], ],
"dependencies": { "dependencies": {
"cssnano": "^6.0.1", "cssnano": "^6.0.1",
......
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
content: ''; content: '';
top: 0; top: 0;
left: 0; left: 0;
-webkit-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -62,7 +61,6 @@ ...@@ -62,7 +61,6 @@
content: ''; content: '';
top: 0; top: 0;
left: 0; left: 0;
-webkit-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -71,20 +69,17 @@ ...@@ -71,20 +69,17 @@
pointer-events: none; pointer-events: none;
} }
@media (-webkit-min-device-pixel-ratio: 1.5), @media (min-device-pixel-ratio: 1.5),
(min-device-pixel-ratio: 1.5),
(min-resolution: 144dpi), (min-resolution: 144dpi),
(min-resolution: 1.5dppx) { (min-resolution: 1.5dppx) {
[retain~="border:top"]:before, [retain~="border:top"]:before,
[retain~="border:bottom"]:after { [retain~="border:bottom"]:after {
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5); transform: scaleY(0.5);
} }
[retain~="border:left"]:before, [retain~="border:left"]:before,
[retain~="border:right"]:after { [retain~="border:right"]:after {
-webkit-transform: scaleX(0.5);
transform: scaleX(0.5); transform: scaleX(0.5);
} }
...@@ -92,7 +87,6 @@ ...@@ -92,7 +87,6 @@
[retain~="round"]:after { [retain~="round"]:after {
width: 200%; width: 200%;
height: 200%; height: 200%;
-webkit-transform: scale(0.5);
transform: scale(0.5); transform: scale(0.5);
} }
...@@ -104,28 +98,24 @@ ...@@ -104,28 +98,24 @@
[retain~="border:left"]:before, [retain~="border:left"]:before,
[retain~="border"]:after, [retain~="border"]:after,
[retain~="round"]:after { [retain~="round"]:after {
-webkit-transform-origin: 0 0;
transform-origin: 0 0; transform-origin: 0 0;
} }
[retain~="border:bottom"]:after, [retain~="border:bottom"]:after,
[retain~="border:right"]:after { [retain~="border:right"]:after {
-webkit-transform-origin: 100% 100%;
transform-origin: 100% 100%; transform-origin: 100% 100%;
} }
} }
@media (-webkit-device-pixel-ratio: 1.5) { @media (device-pixel-ratio: 1.5) {
[retain~="border:top"]:before, [retain~="border:top"]:before,
[retain~="border:bottom"]:after { [retain~="border:bottom"]:after {
-webkit-transform: scaleY(0.6666);
transform: scaleY(0.6666); transform: scaleY(0.6666);
} }
[retain~="border:left"]:before, [retain~="border:left"]:before,
[retain~="border:right"]:after { [retain~="border:right"]:after {
-webkit-transform: scaleX(0.6666);
transform: scaleX(0.6666); transform: scaleX(0.6666);
} }
...@@ -133,7 +123,6 @@ ...@@ -133,7 +123,6 @@
[retain~="round"]:after { [retain~="round"]:after {
width: 150%; width: 150%;
height: 150%; height: 150%;
-webkit-transform: scale(0.6666);
transform: scale(0.6666); transform: scale(0.6666);
} }
...@@ -142,17 +131,15 @@ ...@@ -142,17 +131,15 @@
} }
} }
@media (-webkit-device-pixel-ratio: 3) { @media (device-pixel-ratio: 3) {
[retain~="border:top"]:before, [retain~="border:top"]:before,
[retain~="border:bottom"]:after { [retain~="border:bottom"]:after {
-webkit-transform: scaleY(0.3333);
transform: scaleY(0.3333); transform: scaleY(0.3333);
} }
[retain~="border:left"]:before, [retain~="border:left"]:before,
[retain~="border:right"]:after { [retain~="border:right"]:after {
-webkit-transform: scaleX(0.3333);
transform: scaleX(0.3333); transform: scaleX(0.3333);
} }
...@@ -160,7 +147,6 @@ ...@@ -160,7 +147,6 @@
[retain~="round"]:after { [retain~="round"]:after {
width: 300%; width: 300%;
height: 300%; height: 300%;
-webkit-transform: scale(0.3333);
transform: scale(0.3333); transform: scale(0.3333);
} }
......
@charset "UTF-8"; @charset "UTF-8";
/*! /*!
* retain.css * retain.css
* Version - 1.0.4 * Version - 1.0.5
* Licensed under the Hippocratic License 2.1 - http://firstdonoharm.dev * Licensed under the Hippocratic License 2.1 - http://firstdonoharm.dev
* *
* Copyright (c) 2023 zhengxiao * Copyright (c) 2023 zhengxiao
*/[retain]{--retain-border-color:#d4d4d4;--retain-border-radius:40px;position:relative;position:relative!important}[retain~="border:bottom"]:after,[retain~="border:top"]:before{background:var(--retain-border-color);content:"";height:1px;left:0;pointer-events:none;position:absolute;right:0}[retain~="border:top"]:before{top:0}[retain~="border:bottom"]:after{bottom:0}[retain~="border:left"]:before,[retain~="border:right"]:after{background:var(--retain-border-color);bottom:0;content:"";pointer-events:none;position:absolute;top:0;width:1px}[retain~="border:left"]:before{left:0}[retain~="border:right"]:after{right:0}[retain~=border]:after{border:1px solid var(--retain-border-color)}[retain~=border]:after,[retain~=round]:after{-webkit-box-sizing:border-box;box-sizing:border-box;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}[retain~=round]:after{border:1px solid var(--retain-border-color);border-radius:var(--retain-border-radius)}@media (-webkit-min-device-pixel-ratio:1.5),(min-device-pixel-ratio:1.5),(min-resolution:1.5dppx),(min-resolution:144dpi){[retain~="border:bottom"]:after,[retain~="border:top"]:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}[retain~="border:left"]:before,[retain~="border:right"]:after{-webkit-transform:scaleX(.5);transform:scaleX(.5)}[retain~=border]:after,[retain~=round]:after{height:200%;-webkit-transform:scale(.5);transform:scale(.5);width:200%}[retain~=round]:after{border-radius:calc(var(--retain-border-radius)*2)}[retain~="border:left"]:before,[retain~="border:top"]:before,[retain~=border]:after,[retain~=round]:after{-webkit-transform-origin:0 0;transform-origin:0 0}[retain~="border:bottom"]:after,[retain~="border:right"]:after{-webkit-transform-origin:100% 100%;transform-origin:100% 100%}}@media (-webkit-device-pixel-ratio:1.5){[retain~="border:bottom"]:after,[retain~="border:top"]:before{-webkit-transform:scaleY(.6666);transform:scaleY(.6666)}[retain~="border:left"]:before,[retain~="border:right"]:after{-webkit-transform:scaleX(.6666);transform:scaleX(.6666)}[retain~=border]:after,[retain~=round]:after{height:150%;-webkit-transform:scale(.6666);transform:scale(.6666);width:150%}[retain~=round]:after{border-radius:calc(var(--retain-border-radius)*1.5)}}@media (-webkit-device-pixel-ratio:3){[retain~="border:bottom"]:after,[retain~="border:top"]:before{-webkit-transform:scaleY(.3333);transform:scaleY(.3333)}[retain~="border:left"]:before,[retain~="border:right"]:after{-webkit-transform:scaleX(.3333);transform:scaleX(.3333)}[retain~=border]:after,[retain~=round]:after{height:300%;-webkit-transform:scale(.3333);transform:scale(.3333);width:300%}[retain~=round]:after{border-radius:calc(var(--retain-border-radius)*3)}} */
\ No newline at end of file [retain] {
--retain-border-color: #d4d4d4;
--retain-border-radius: 40px;
position: relative;
position: relative !important;
-webkit-transition: all .3;
transition: all .3
}
[retain~="border:bottom"]:after,
[retain~="border:top"]:before {
background: var(--retain-border-color);
content: "";
height: 1px;
left: 0;
pointer-events: none;
position: absolute;
right: 0
}
[retain~="border:top"]:before {
top: 0
}
[retain~="border:bottom"]:after {
bottom: 0
}
[retain~="border:left"]:before,
[retain~="border:right"]:after {
background: var(--retain-border-color);
bottom: 0;
content: "";
pointer-events: none;
position: absolute;
top: 0;
width: 1px
}
[retain~="border:left"]:before {
left: 0
}
[retain~="border:right"]:after {
right: 0
}
[retain~=border]:after {
border: 1px solid var(--retain-border-color);
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
content: "";
height: 100%;
left: 0;
pointer-events: none;
position: absolute;
top: 0;
width: 100%
}
[retain~=round]:after {
border: 1px solid var(--retain-border-color);
border-radius: var(--retain-border-radius);
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
content: "";
height: 100%;
left: 0;
pointer-events: none;
position: absolute;
top: 0;
width: 100%
}
@media (-webkit-min-device-pixel-ratio:1.5),
(min-device-pixel-ratio:1.5),
(min-resolution:1.5dppx),
(min-resolution:144dpi) {
[retain~="border:bottom"]:after,
[retain~="border:top"]:before {
-webkit-transform: scaleY(.5);
-ms-transform: scaleY(.5);
transform: scaleY(.5)
}
[retain~="border:left"]:before,
[retain~="border:right"]:after {
-webkit-transform: scaleX(.5);
-ms-transform: scaleX(.5);
transform: scaleX(.5)
}
[retain~=border]:after,
[retain~=round]:after {
height: 200%;
-webkit-transform: scale(.5);
-ms-transform: scale(.5);
transform: scale(.5);
width: 200%
}
[retain~=round]:after {
border-radius: -webkit-calc(var(--retain-border-radius)*2);
border-radius: calc(var(--retain-border-radius)*2)
}
[retain~="border:left"]:before,
[retain~="border:top"]:before,
[retain~=border]:after,
[retain~=round]:after {
-webkit-transform-origin: 0 0;
-ms-transform-origin: 0 0;
transform-origin: 0 0
}
[retain~="border:bottom"]:after,
[retain~="border:right"]:after {
-webkit-transform-origin: 100% 100%;
-ms-transform-origin: 100% 100%;
transform-origin: 100% 100%
}
}
@media (device-pixel-ratio:1.5) {
[retain~="border:bottom"]:after,
[retain~="border:top"]:before {
-webkit-transform: scaleY(.6666);
-ms-transform: scaleY(.6666);
transform: scaleY(.6666)
}
[retain~="border:left"]:before,
[retain~="border:right"]:after {
-webkit-transform: scaleX(.6666);
-ms-transform: scaleX(.6666);
transform: scaleX(.6666)
}
[retain~=border]:after,
[retain~=round]:after {
height: 150%;
-webkit-transform: scale(.6666);
-ms-transform: scale(.6666);
transform: scale(.6666);
width: 150%
}
[retain~=round]:after {
border-radius: -webkit-calc(var(--retain-border-radius)*1.5);
border-radius: calc(var(--retain-border-radius)*1.5)
}
}
@media (device-pixel-ratio:3) {
[retain~="border:bottom"]:after,
[retain~="border:top"]:before {
-webkit-transform: scaleY(.3333);
-ms-transform: scaleY(.3333);
transform: scaleY(.3333)
}
[retain~="border:left"]:before,
[retain~="border:right"]:after {
-webkit-transform: scaleX(.3333);
-ms-transform: scaleX(.3333);
transform: scaleX(.3333)
}
[retain~=border]:after,
[retain~=round]:after {
height: 300%;
-webkit-transform: scale(.3333);
-ms-transform: scale(.3333);
transform: scale(.3333);
width: 300%
}
[retain~=round]:after {
border-radius: -webkit-calc(var(--retain-border-radius)*3);
border-radius: calc(var(--retain-border-radius)*3)
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment