k314136
k314136

Reputation: 3

SASS: use material variables (from angular2)

In material theme there is such code:

$md-indigo: (
  50: #e8eaf6,
  100: #c5cae9,
  200: #9fa8da,
  300: #7986cb,
  400: #5c6bc0,
  500: #3f51b5,
  ...
)

and

.text-overflow {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

how in other file i can use this variables (skip import rule)?

for example:

.someclass {
    color: $md-indigo-500;
    .text-overflow();
}

Upvotes: 0

Views: 140

Answers (1)

Raviteja
Raviteja

Reputation: 3479

You can use .text-overflow in .someclass as

.someclass {
    color: $md-indigo-500;
    @extend .text-overflow;
}

Upvotes: 1

Related Questions