Socket
Socket
Sign inDemoInstall

@littlemissrobot/sass-mixins

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@littlemissrobot/sass-mixins

Little Miss Robot sass mixins library that helps execute reusable and complex tasks


Version published
Weekly downloads
41
decreased by-8.89%
Maintainers
1
Weekly downloads
 
Created
Source

Little Miss Robot - Sass mixins

This repository contains SASS mixins that we, at Little Miss Robot, like to use to make our wonderful lives in the world of SASS easier and more managable.

Info

This package contains no styling but simply provides a couple of mixins that execute a simple task and provide functionality based on certain variables.

Dependencies

  • @littlemissrobot/sass-functions/lib/main

Install

$ npm install --save-dev @littlemissrobot/sass-mixins

Usage

  1. Import the library from the node_modules folder.
@import
	// Dependency
	"@littlemissrobot/sass-functions/lib/main",
	// Library
	"@littlemissrobot/sass-mixins/lib/main";
  1. That's it! The mixins that are present within this file are now available to you!

Mixins

get-font($name, $url, $weight: normal, $style: normal)

Load a font file. Every version of the font should have the same name.

Parameters:

  • $name: a name given to the font
  • $url: location of the font file
  • $weight: the weight (100, 300, 400, ...) the font file is based on
  • $style: the style (italic, normal, ...) the font file is based on
@include get-font("Roboto", "/fonts/roboto/roboto", 300, normal);

responsive-prop($props, $responsive, $min, $max: false, $fallback: false)

Create CSS properties that are responsive by defining a minimum and maximum value. For example: responsive font-sizes.

  • $props: the properties to make responsive, each property is separated by a space
  • $responsive: the value that should scale with the viewport width, expressed in vw units
  • $min: the minimum value, the $responsive does not go lower than this
  • $max: the maximum value, the $responsive does not go higher than this
  • $fallback: A fallback when the vw unit is not supported by the browser
p {
	@include responsive-prop("font-size", 2vw, 2rem, 4rem);
}

p {
	@include responsive-prop("font-size" "line-height", 2vw, 2rem, 4rem);
}

Keywords

FAQs

Package last updated on 06 Apr 2020

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