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

@avalanche/object-container

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@avalanche/object-container

Basic container class to limit the max-width of the layout and add some padding

  • 4.0.0-alpha.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14
increased by7.69%
Maintainers
2
Weekly downloads
 
Created
Source

@avalanche/object-container

Basic container class to limit the max-width of the layout and add some padding.

  • [Documentation](https://avalanche.oberlehner.net/documentation/#object: container)

Install

npm install @avalanche/object-container --save-dev

Basic usage

// Import the main file.
@import 'node_modules/@avalanche/object-container/scss/index.scss';

Usage with node-sass-magic-importer

Using node-sass (or a plugin for Grunt, gulp or webpack which is using node-sass) in combination with the node-sass-magic-importer custom importer, can make importing CSS dependencies from node_modules a much nicer experience.

// Import the main file.
@import '~@avalanche/object-container';

// Import just the classes you need.
@import '{ .o-container, .o-container--s } from ~@avalanche/object-container';

// Not a fan of the "o-" prefix?
@import '{ .o-container as .container } from ~@avalanche/object-container';

Demo

<div class="o-container">
  <h2>Lorem Ipsum</h2>
  <p>Contained content.</p>
</div>

Sizes

Modify the container max widths via the $o-container-max-widths map variable.

$o-container-max-widths: (
  s: 32rem,
  m: 64rem,
  l: 96rem
);
<div class="o-container o-container--l">
  <h2>Lorem Ipsum</h2>
  <p>Contained content.</p>
</div>

Mixins

@import 'node_modules/@avalanche/object-container/scss/mixins';

// Usage.
.container {
  @include o-container(64rem, 1rem);
}

Settings

/// Container max widths.
/// @type Map
$o-container-max-widths: (
  s: 32rem,
  m: 64rem,
  l: 96rem,
) !default;

/// Default container size.
/// @type String
$o-container-max-width-default: m !default;

/// Horizontal spacing.
/// @type String
$o-container-spacing-horizontal: m !default;

/// Horizontal centering.
/// @type Boolean
$o-container-center-horizontal: true !default;

About

Author

Markus Oberlehner
Website: https://markus.oberlehner.net
Twitter: https://twitter.com/MaOberlehner
PayPal.me: https://paypal.me/maoberlehner

License

MIT

Keywords

FAQs

Package last updated on 31 Jan 2019

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