Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
K
kpp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alexandr Veselov
kpp
Commits
530c4984
Commit
530c4984
authored
Jun 01, 2017
by
Nikolay Gromov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Добавил Polyfill object-fit/object-position
parent
eab0cc3d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
13 deletions
+21
-13
.gitignore
.gitignore
+1
-0
gulpfile.js
gulpfile.js
+3
-1
package.json
package.json
+3
-10
projectConfig.json
projectConfig.json
+4
-2
object-fit-polyfill.js
src/blocks/object-fit-polyfill/object-fit-polyfill.js
+3
-0
object-fit-polyfill.scss
src/blocks/object-fit-polyfill/object-fit-polyfill.scss
+7
-0
No files found.
.gitignore
View file @
530c4984
...
@@ -10,6 +10,7 @@ src/blocks/sprite-png/img/sprite-*.png
...
@@ -10,6 +10,7 @@ src/blocks/sprite-png/img/sprite-*.png
_arc/
_arc/
bower_components/
bower_components/
node_modules/
node_modules/
package-lock.json
.vscode/
.vscode/
.DS_Store
.DS_Store
*.log
*.log
...
...
gulpfile.js
View file @
530c4984
...
@@ -12,6 +12,7 @@ const mqpacker = require("css-mqpacker");
...
@@ -12,6 +12,7 @@ const mqpacker = require("css-mqpacker");
const
atImport
=
require
(
"postcss-import"
);
const
atImport
=
require
(
"postcss-import"
);
const
cleanss
=
require
(
'gulp-cleancss'
);
const
cleanss
=
require
(
'gulp-cleancss'
);
const
inlineSVG
=
require
(
'postcss-inline-svg'
);
const
inlineSVG
=
require
(
'postcss-inline-svg'
);
const
objectFitImages
=
require
(
'postcss-object-fit-images'
);
const
plumber
=
require
(
'gulp-plumber'
);
const
plumber
=
require
(
'gulp-plumber'
);
const
notify
=
require
(
'gulp-notify'
);
const
notify
=
require
(
'gulp-notify'
);
...
@@ -46,7 +47,8 @@ let postCssPlugins = [
...
@@ -46,7 +47,8 @@ let postCssPlugins = [
sort
:
true
sort
:
true
}),
}),
atImport
(),
atImport
(),
inlineSVG
()
inlineSVG
(),
objectFitImages
()
];
];
// Очистка папки сборки
// Очистка папки сборки
...
...
package.json
View file @
530c4984
...
@@ -57,26 +57,19 @@
...
@@ -57,26 +57,19 @@
"
merge-stream
"
:
"
^1.0.1
"
,
"
merge-stream
"
:
"
^1.0.1
"
,
"
postcss-import
"
:
"
^10.0.0
"
,
"
postcss-import
"
:
"
^10.0.0
"
,
"
postcss-inline-svg
"
:
"
^3.0.0
"
,
"
postcss-inline-svg
"
:
"
^3.0.0
"
,
"
postcss-object-fit-images
"
:
"
^1.1.2
"
,
"
stylelint
"
:
"
^7.9.0
"
,
"
stylelint
"
:
"
^7.9.0
"
,
"
vinyl-buffer
"
:
"
^1.0.0
"
,
"
vinyl-buffer
"
:
"
^1.0.0
"
,
"
yaspeller
"
:
"
^3.1.0
"
"
yaspeller
"
:
"
^3.1.0
"
},
},
"dependencies"
:
{
"dependencies"
:
{
"
browser-sync
"
:
"
^2.18.12
"
,
"
gulp-file-include
"
:
"
^1.1.0
"
,
"
gulp-imagemin
"
:
"
^3.2.0
"
,
"
gulp-sourcemaps
"
:
"
^2.6.0
"
,
"
gulp-svgmin
"
:
"
^1.2.4
"
,
"
gulp.spritesmith
"
:
"
^6.5.0
"
,
"
ismobilejs
"
:
"
^0.4.0
"
,
"
ismobilejs
"
:
"
^0.4.0
"
,
"
jquery
"
:
"
^3.1.1
"
,
"
jquery
"
:
"
^3.1.1
"
,
"
jquery-migrate
"
:
"
^3.0.0
"
,
"
jquery-migrate
"
:
"
^3.0.0
"
,
"
lint-staged
"
:
"
^3.5.0
"
,
"
nouislider
"
:
"
^9.2.0
"
,
"
nouislider
"
:
"
^9.2.0
"
,
"
object-fit-images
"
:
"
^3.2.3
"
,
"
owl.carousel
"
:
"
^2.2.0
"
,
"
owl.carousel
"
:
"
^2.2.0
"
,
"
stylelint
"
:
"
^7.10.1
"
,
"
svg4everybody
"
:
"
^2.1.8
"
,
"
svg4everybody
"
:
"
^2.1.8
"
,
"
swipejs
"
:
"
^2.2.6
"
,
"
swipejs
"
:
"
^2.2.6
"
"
yaspeller
"
:
"
^3.2.0
"
}
}
}
}
projectConfig.json
View file @
530c4984
...
@@ -53,7 +53,8 @@
...
@@ -53,7 +53,8 @@
"media"
:
[],
"media"
:
[],
"modal"
:
[],
"modal"
:
[],
"close"
:
[],
"close"
:
[],
"tabs"
:
[]
"tabs"
:
[],
"object-fit-polyfill"
:
[]
},
},
"addCssBefore"
:
[
"addCssBefore"
:
[
"./src/scss/variables.scss"
,
"./src/scss/variables.scss"
,
...
@@ -75,7 +76,8 @@
...
@@ -75,7 +76,8 @@
"./node_modules/ismobilejs/isMobile.min.js"
,
"./node_modules/ismobilejs/isMobile.min.js"
,
"./node_modules/owl.carousel/dist/owl.carousel.js"
,
"./node_modules/owl.carousel/dist/owl.carousel.js"
,
"./node_modules/swipejs/build/swipe.min.js"
,
"./node_modules/swipejs/build/swipe.min.js"
,
"./node_modules/nouislider/distribute/nouislider.js"
"./node_modules/nouislider/distribute/nouislider.js"
,
"./node_modules/object-fit-images/dist/ofi.js"
],
],
"addJsAfter"
:
[
"addJsAfter"
:
[
"./src/js/global-script.js"
"./src/js/global-script.js"
...
...
src/blocks/object-fit-polyfill/object-fit-polyfill.js
0 → 100644
View file @
530c4984
document
.
addEventListener
(
'DOMContentLoaded'
,
function
(){
objectFitImages
();
});
src/blocks/object-fit-polyfill/object-fit-polyfill.scss
0 → 100644
View file @
530c4984
// Никакая стилизация этого Блока по умолчанию не нужна.
// Полифил включается в js-файле, добавочная стилизация для картинок с указанным object-fit: cover;
// добавится с помощью PostCSS-плагина на этапе постобработки css-файла(ов).
// Полифил: https://github.com/bfred-it/object-fit-images
// Добавленный PostCSS-плагин: https://github.com/ronik-design/postcss-object-fit-images
.object-fit-polyfill
{}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment