BioPhoton / BioPhoton/angular-star-rating

Contextualize CSS

Open
#74 4 comments 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
219
Forks
82
PR merge metrics
No merged PRs in 30d

Description

## I'm submitting a...

[ ] Bug report

[x] Feature request

## Current behavior
This module is wrapping style to global scope, exactly as `css-star-rating` does.

Globally appended classes: `.rating`, `.star`, `.star-container`, `.center-all`, `.label-value`.

## Expected behavior
However, angular introduced a very good practice that scope style to a component.

It would be great (to import) to attach SCSS styles to the component but not as global.

A very quick fix is to surround by the angular component name:
```scss
star-rating-comp {
@import "~css-star-rating/dist/scss/star-rating.scss";
}
```

Probably the better way should be attaching the `css-star-rating`'s style sheet to the `ngComponent`.

## Minimal reproduction of the problem with instructions

For instance, use `

...
` anywhere in your application.

## Environment



Library version: 3.0.8
Angular version: 5.2.7

Browser:

- [x] all

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.