$breakpoints: (
'xs': ('(max-width: 576px)'),
'sm': ('(max-width: 768px)'),
'md': ('(max-width: 992px)'),
'lg': ('(max-width: 1199px)'),
);
@mixin respond-to($breakpoint) {
@if map-has-key($breakpoints, $breakpoint) {
@media #{inspect(map-get($breakpoints, $breakpoint))} {
@content;
}
} @else {
@error 'Не указано значение для `#{$breakpoint}`';
}
}
@include respond-to('md') {
// ...
}
<svg viewBox="0 0 340 333">
<path class="path" fill="white" stroke="black" stroke-width="4" d="M66.039,133.545c0,0-21-57,18-67s49-4,65,8s30,41,53,27s66,4,58,32s-5,44,18,57s22,46,0,45s-54-40-68-16s-40,88-83,48s11-61-11-80s-79-7-70-41C46.039,146.545,53.039,128.545,66.039,133.545z"/>
</svg>
.path {
stroke-dasharray: 1000;
stroke-dashoffset: 1000;
animation: dash 5s linear alternate infinite;
}
@keyframes dash {
from {
stroke-dashoffset: 822;
}
to {
stroke-dashoffset: 0;
}
}
gulp.task('html', function () {
gulp.src('src/*.html') //Выберем файлы по нужному пути
.pipe(rigger()) //Прогоним через rigger
.pipe(gulp.dest('dist/')) //Выплюнем их в папку build
.pipe(browserSync.reload({stream: true})); //И перезагрузим наш сервер для обновлений
});
<!DOCTYPE html>
<html>
<head lang="ru">
<meta charset="UTF-8">
<title>Пум-пум</title>
</head>
<body>
//= template/header.html
<section class="content">
Content
</section>
//= template/footer.html
</body>
</html>
Math.floorOrig = Math.floor;
Math.floor = (n) => {
window.num = Math.floorOrig(n)
return window.num;
}
function getNum() {
const num = Math.floor(Math.random() * 10);
}
getNum();
console.log(window.num);
function getNum() {
const num = Math.floor(Math.random() * 10);
}
function getNum() {
return Math.floor(Math.random() * 10);
}
console.log(getNum());