Skip to content

Instantly share code, notes, and snippets.

View Onepo1ntFive's full-sized avatar
🍉

Sergei Solovev Onepo1ntFive

🍉
View GitHub Profile
'use strict';
var gulp = require('gulp'),
watch = require('gulp-watch'),
prefixer = require('gulp-autoprefixer'),
uglify = require('gulp-uglify'),
sass = require('gulp-sass'),
sourcemaps = require('gulp-sourcemaps'),
rigger = require('gulp-rigger'),
cssmin = require('gulp-minify-css'),
@Onepo1ntFive
Onepo1ntFive / js. smooth scrollTo pure js
Created January 30, 2020 12:49
Плавный scrollTo на чистом js
//scrollTo
function scrollIt(destination, duration = 200, easing = 'linear', callback) {
const easings = {
linear(t) {
return t;
},
easeInQuad(t) {
return t * t;
},
@Onepo1ntFive
Onepo1ntFive / menu.css
Created July 11, 2019 14:01
html. css. js. topmenu 2й 3й уровни равной высоты
.b-sevice {
padding: [menu.top.level1.level1_bg.padding];
background: [menu.top.level1.level1_bg.color] url("[menu.top.level1.level1_bg.img]") [menu.top.level1.level1_bg.repeat] scroll [menu.top.level1.level1_bg.hposition] [menu.top.level1.level1_bg.vposition];
text-align: [menu.top.position];
line-height: 1;
position: relative;
}
.b-sevice:after,
.b-sevice ul:after {
clear: both;
@Onepo1ntFive
Onepo1ntFive / css. scrolltop
Last active September 4, 2018 08:12
js. scrolltop
.b-scrolltop {
position: fixed;
z-index: 999;
width: 40px;
height: 40px;
left: 20px;
bottom: -100px;
background-color: #f00;
cursor: pointer;
-webkit-transition: bottom 0.3s ease-out;
.b-cols > [class^="cols__col-"] {
width: 100%;
}
.b-cols .cols__col-mobile-1-12 {
width: calc((100% / 12) * 1);
}
.b-cols .cols__col-mobile-2-12 {
width: calc((100% / 12) * 2);
}
.b-cols .cols__col-mobile-3-12 {
@Onepo1ntFive
Onepo1ntFive / shadow-table.css
Last active July 18, 2018 10:24
css. responsive table width shadows
/*- https://github.com/iKristjan/bootstrap-responsive-table-scrolling-shadows -*/
.table-responsive {
background:
radial-gradient(farthest-side at 0% 50%, rgba(0,0,0,.2), rgba(0,0,0,0)),
radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.2), rgba(0,0,0,0)) 100% 0;
background-color: white;
background-repeat: no-repeat;
background-size: 10px 100%;
margin-bottom: 15px;
overflow-x: auto;
ol {
counter-reset: item;
margin-left: 0;
padding-left: 0;
}
li {
display: block;
margin-bottom: .5em;
margin-left: 2em;
}
.parent {
margin: 0 -10px;
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
flex-flow: row wrap;
}
.parent .child {
-webkit-flex: 1 auto;
flex: 1 auto;
.block-width-cols {
-webkit-column-count: 2;
-moz-column-count: 2;
column-count: 2;
-webkit-column-gap: 15px;
-moz-column-gap: 15px;
column-gap: 15px;
}
.block-width-cols .block-width-cols__item {
-webkit-column-break-inside: avoid;