angular-slider / angular-slider/ngx-slider
Parent CSS scaling messes up the slider
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 411
- Forks
- 176
- PR merge metrics
- No merged PRs in 30d
Description
Bug
A bug I stumbled into is that the slider breaks (displays wrong) if the ngx-slider element or any of it's parents contain a CSS scaling transform rule (Eg : transform : scale(N) ; ).
Steps to replicate:
- Create a parent to contain your slider and set the CSS rule transform:scale(2);.
- Add an ngx-slider as a child to that parent.
- Load the page and attempt to slide the slider.
Reproduction: https://codesandbox.io/s/cool-darkness-tkbp0k?file=/src/app/app.component.html
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodeSandbox reproduction, especially src/app/app.component.html, and reproduce the slider inside a parent using transform:scale(2). Trace the slider's display and interaction behavior under that transform; done means it renders correctly and can be operated accurately when the slider or an ancestor is scaled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, css, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100