1.0.5 • Published 4 years ago

@atyoursite/scss v1.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Polyfills

aysPolyfillObjectFit()

Description

aysPolyfillObjectFit() checks if the browser supports object-fit.
if not, all img elements with parameter data-object-fit="cover" and data-object-fit="contain" will be converted to background versions.
Background image cover and contain are fully supported.

<img src="{{path to image file}}" data-object-fit="contain" alt="{{alternative description}}">

Dependency

Open a terminal window inside the root of your project to install the node package.

npm install --save-dev @atyoursite/polyfill

Usage

To be able to use the function, you will have to import it as a dependency

import { aysPolyfillObjectFit } from '@atyoursite/polyfill';

Initialize

aysPolyfillObjectFit();
1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.0

4 years ago

1.0.1

4 years ago