Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Contextualize CSS

Open
#74 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
angular, scss, typescript
Domain
frontend

Research direction

Start by tracing how css-star-rating/dist/scss/star-rating.scss is imported and how the Angular component currently loads styles. Review Angular component style scoping and the listed global classes. Done means the component’s styles are no longer appended globally while the star-rating appearance remains usable.

Written by the indexing model from the issue text.

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:

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 <div class="label-value">...</div> anywhere in your application.

Environment


Library version: 3.0.8
Angular version: 5.2.7


Browser:

- [x] all
Dominant language
TypeScript
Stars
219
Forks
82
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from BioPhoton/angular-star-rating

All issues in BioPhoton/angular-star-rating

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.