JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 21
  • Score
    100M100P100Q65391F
  • License MIT

Media object - image on left/right, text next to it

Package Exports

  • @avalanche/object-media

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@avalanche/object-media) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@avalanche/object-media

Media object - image on left/right, text next to it.

Install

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

Basic usage

// Import the main file.
@import 'node_modules/@avalanche/object-media/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-media';

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

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

Demo

Default spacing size

<div class="o-media">
  <div class="o-media__figure">
    <img src="http://placehold.it/50x50" alt="Placeholder">
  </div>
  <div class="o-media__body">
    Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et.
  </div>
</div>

X-large spacing size

<div class="o-media o-media--xl">
  <div class="o-media__figure">
    <img src="http://placehold.it/50x50" alt="Placeholder">
  </div>
  <div class="o-media__body">
    Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et.
  </div>
</div>

Mixins

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

// Usage.
.media {
  @include o-media();
}

.media-figure {
  @include o-media-figure();
}

.media-body {
  @include o-media-body();
}

Settings

/// Default spacing.
/// @type String
$o-media-spacing-default: m !default;

About

Author

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

License

MIT