This repository has been archived by the owner on Jan 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 123
Remove vendor prefixes from Sass #291
Labels
Comments
Maybe we can just ignore the |
Another option may be to use something like the sass-mediaqueries mixin. .brand {
background-image: url(logo.png);
@include hdpi {
background-image: url(logo_2x.png);
}
} Plus seems to have some other nice media query functions. |
If you are on the hunt for a Sass Media-Query manager, I would suggest either Breakpoint or Include-Media. Both simple APIs. :) |
I was looking at this again today and a third option came to mind if we want to suppress the sass-lint warnings. Move the hidpi code into its own module (_hidpi.scss) and then just ignore that file from sass-linting (via gulpfile glob): _hidpi.scss// Image Manangement
@mixin hidpi-background-image($filename, $background-size: 'mixed', $extension: png) {
background-image: url('../images/#{$filename}.#{$extension}');
@if ($background-size != 'mixed') {
background-size: $background-size;
}
@media (min--moz-device-pixel-ratio: 1.3),
(-o-min-device-pixel-ratio: 2.6/2),
(-webkit-min-device-pixel-ratio: 1.3),
(min-device-pixel-ratio: 1.3),
(min-resolution: 1.3dppx) {
background-image: url('../images/#{$filename}@2x.#{$extension}');
}
} gulpfile.jsgulp.task('sass-lint', function sassLintTask() {
return gulp.src([
SRC_PATH + '/styles/**/*.scss',
'!' + SRC_PATH + '/styles/_hidpi.scss'
])
.pipe(sassLint())
.pipe(sassLint.format())
.pipe(sassLint.failOnError());
}); |
Fixed by #472 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Ref #275
Not sure what to do here. The
indentation
warnings here seem like a bug in multiline rules and Sass Lint.As for
no-vendor-prefixes
, this is for media query stuff, so not sure if we leverage Autoprefixer to give us prefixes or if we find some mixin to add media queries, or find if there is an way way to ignore specific Sass Lint rules in specific files/blocks to suppress these warnings.The text was updated successfully, but these errors were encountered: