Socket
Socket
Sign inDemoInstall

sbweb-scalegorithm

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    sbweb-scalegorithm

Scalegorithm calculates how to properly scale a child element within a parent when conventional CSS options fail.


Version published
Maintainers
1
Created

Readme

Source

Scalegorithm

Scalegorithm calculates how to properly scale a child element within a parent when conventional CSS options fail. This is useful for image scaling and cross-domain iframe situations.

Features:

  • Auto fit images in a container
  • Simulate padding around image
  • Recenter origin after scaling
  • Limit upscaling to prevent pixalation

Scale math

Instead of directly manipulating DOM elements using scaleChild(), you may also use the calc() function to calculate numerical results.

Example

Check https://codepen.io/anon/pen/qQYzOY for an example.


Build Status

Keywords

FAQs

Last updated on 25 Nov 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc