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

eyeglass-image-dimensions

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eyeglass-image-dimensions

An eyeglass module that provides libsass the same image dimensions functionality found in ruby compass.

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status NPM Downloads devDependency Status

eyeglass-image-dimensions

An eyeglass module to give LibSass the same image dimension functionality found in ruby compass.

Setup

To use image dimensions first install eyeglass then eyeglass-image-dimensions:

npm install eyeglass --save-dev
npm install eyeglass-image-dimensions --save-dev

Then add the following to your sass file/s:

@import 'image-dimensions';

Usage

image-width

returns the width of the image in pixels.

width: image-width($image);

image-height

returns the height of the image in pixels.

height: image-height($image);

image-dimensions

returns a space separated list consisting of the width and height of an image in pixels.

background-size: image-dimensions($image);

Keywords

FAQs

Package last updated on 15 Mar 2017

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