New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ember-component-css-withbp

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

ember-component-css-withbp

An Ember CLI addon which allows you to specify CSS inside of component pod directories

latest
Source
npmnpm
Version
0.1.9
Version published
Maintainers
1
Created
Source

ember-component-css Build Status

An Ember CLI addon which allows you to specify CSS inside of component pod directories

The announcement from EmberConf 2015 CSS is hard - EmberConf 2015

Installation

ember install ember-component-css

Usage

This addon allows you to specify a styles.css file inside of your component's pod folder (app/my-component/styles.css).

Rules defined inside of these styles.css files will automatically be namespaced with an autogenerated class. That autogenerated class will also be injected into your component's classNames property. This enables you to worry less about rules clashing across component styles.

For example, given this app/my-component/styles.css file:

& {
  padding: 2px;
}
.urgent {
  color: red;
}

Your generated CSS output will look something like:

.my-component-a34fba {
  padding: 2px;
}
.my-component-a34fba .urgent {
  color: red;
}

A typical component invocation that looks like this:

{{my-component}}

will generated markup like:

<div class="my-component-a34fba"></div>

With Preprocessors

To use this addon with another preprocessor (such as Sass or Less), simply import pod-styles into your base app stylesheet.

For example, if you're using Sass:

// app/styles/app.scss
@import "pod-styles";

And that is it! The pod-styles file is generated during the build and will then be pulled into your other stylesheet to be processed like normal.

Approved preprocessors:

Keywords

ember-addon

FAQs

Package last updated on 10 Dec 2015

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