Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-object-fit-images

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-object-fit-images

PostCSS plugin that updates the standard object-fit tag to work with the object-fit-images polyfill for browsers that do not natively support object-fit.

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11K
increased by5.44%
Maintainers
1
Weekly downloads
 
Created
Source

PostCSS Object Fit Images Build Status

PostCSS plugin that updates the standard object-fit tag to work with the object-fit-images polyfill for browsers that do not natively support object-fit..

For use with object-fit-images

.foo {
    object-fit: cover;
    object-position: top;
}

Compiles to:

.foo {
    font-family: "object-fit: cover; object-position: top";
    object-fit: cover;
    object-position: top;
}

Existing font and font-family

Existing font and font-family declarations are kept and object-fit-images will still work:

.foo {
    object-fit: cover;
    object-position: top;
    font-family: "Helvetica Neue";
}

/* Compiles to: */

.foo {
    object-fit: cover;
    object-position: top;
    font-family: "object-fit:cover;object-position:top", "Helvetica Neue";
}
.foo {
    object-fit: cover;
    object-position: top;
    font: strong 1em/1.4 "Helvetica Neue";
}

/* Compiles to: */

.foo {
    object-fit: cover;
    object-position: top;
    font: strong 1em/1.4 "Helvetica Neue";
    font-family: "object-fit:cover;object-position:top", "Helvetica Neue";
}

Usage

postcss([ require('postcss-object-fit-images') ])

See PostCSS docs for examples for your environment.

Contributors

Keywords

FAQs

Package last updated on 07 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc