This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// HTML | |
<div class="product__tabs tabs"> | |
<input type="radio" class="tabs__input" name="tab" id="tab-1" checked> | |
<label for="tab-1" class="tabs__label">Описание</label> | |
<input type="radio" class="tabs__input" name="tab" id="tab-2"> | |
<label for="tab-2" class="tabs__label">Характеристики</label> | |
<input type="radio" class="tabs__input" name="tab" id="tab-3"> | |
<label for="tab-3" class="tabs__label">Отзывы</label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*CSS transitions*/ | |
-o-transition-property: none !important; | |
-moz-transition-property: none !important; | |
-ms-transition-property: none !important; | |
-webkit-transition-property: none !important; | |
transition-property: none !important; | |
/*CSS transforms*/ | |
-o-transform: none !important; | |
-moz-transform: none !important; | |
-ms-transform: none !important; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Replace all SVG images with inline SVG | |
$('img.img-svg').each(function(){ //.img-svg add img class | |
var $img = $(this); | |
var imgID = $img.attr('id'); | |
var imgClass = $img.attr('class'); | |
var imgURL = $img.attr('src'); | |
$.get(imgURL, function(data) { | |
// Get the SVG tag, ignore the rest | |
var $svg = $(data).find('svg'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//HTML | |
<!-- begin tabs --> | |
<div class="tab__wrap"> | |
<div class="tab__titles"> | |
<div class="tab__title is-active" data-tab="0">tab 1</div> | |
<div class="tab__title" data-tab="1">tab 2</div> | |
<div class="tab__title" data-tab="2">tab 3</div> | |
</div> | |
<div class="tab__contentes"> | |
<div class="tab__content" style="display: block;">content 1content 1content 1content 1content 1content 1content 1content 1content 1content 1</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var src = "___library/7-kazan/1/*"; | |
var dst = "_ready"; | |
var gulp = require('gulp'), | |
imagemin = require('gulp-imagemin'), | |
cache = require('gulp-cache'), | |
del = require('del'), | |
imageResize = require('gulp-image-resize'), | |
watermark = require("gulp-watermark"), | |
rename = require("gulp-rename"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sass-convert -F scss -T sass application_styles.css.scss application_styles.css.sass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param {HTMLElement} element | |
* @param {Object} settings | |
*/ | |
function _initLazyLoadImage(element, settings) { | |
let images; | |
let s = settings || {}; | |
if (element !== undefined) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _detectBrowserType() { | |
const html = document.querySelector('html'); | |
const isChrome = !!window.chrome && !isOpera; | |
const isFirefox = typeof window.InstallTrigger !== 'undefined'; | |
const userAgent = navigator.userAgent || navigator.vendor || window.opera; | |
const isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0; | |
const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); | |
const isExplorer = typeof document !== 'undefined' && !!document.documentMode && !isEdge; | |
// if (/windows phone/i.test(userAgent)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"plugins": [ | |
"stylelint-scss", | |
"stylelint-selector-bem-pattern", | |
"stylelint-order" | |
], | |
"rules": { | |
"property-case": "lower", | |
"selector-type-case": "lower", | |
"indentation": 4, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"useTabs": false, | |
"printWidth": 100, | |
"singleQuote": true, | |
"trailingComma": "es5", | |
"bracketSpacing": true, | |
"jsxBracketSameLine": false, | |
"tabWidth": 4, | |
"semi": true | |
} |
OlderNewer