Skip to content

Instantly share code, notes, and snippets.

@MrZhouZh
Last active June 8, 2023 11:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrZhouZh/8f45511eb9991857c95cf540e2fd24e7 to your computer and use it in GitHub Desktop.
Save MrZhouZh/8f45511eb9991857c95cf540e2fd24e7 to your computer and use it in GitHub Desktop.
Prefix Snippets - Collection of Sass Snippets.
.prefix-test {
-webkit-column-count: 3;
-moz-column-count: 3;
-ms-column-count: 3;
-o-column-count: 3;
column-count: 3;
-webkit-column-gap: 1.5em;
-moz-column-gap: 1.5em;
-ms-column-gap: 1.5em;
-o-column-gap: 1.5em;
column-gap: 1.5em;
-webkit-column-rule: 2px solid hotpink;
-moz-column-rule: 2px solid hotpink;
-ms-column-rule: 2px solid hotpink;
-o-column-rule: 2px solid hotpink;
column-rule: 2px solid hotpink;
}
// 添加兼容性前缀
@mixin prefix($declarations, $prefixes: ()) {
@each $property, $value in $declarations {
@each $prefix in $prefixes {
#{'-' + $prefix + '-' + $property}: $value;
}
#{$property}: $value;
}
}
.prefix-test {
@include prefix((
column-count: 3,
column-gap: 1.5em,
column-rule: 2px solid hotpink
), webkit moz ms o)
}
`
{
"sass": {
"compiler": "dart-sass/1.32.12",
"extensions": {},
"syntax": "SCSS",
"outputStyle": "expanded"
},
"autoprefixer": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment