lcdsantos / lcdsantos/jQuery-Selectric
use classes instead inline styles to change elements behaviour
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 715
- Forks
- 149
- PR merge metrics
- No merged PRs in 30d
Description
Since I set up CSP (Content Security Policy) on a website that uses selectric for an customizable search form, browser throws errors about blocking inline styles due to CSP policy. At the same time everything seems to be working fine (that's strange).
I tried to exclude CSP checks on backend for this particular view which uses this form with selectric. But it doesn't work since selectric starts working after view is loaded (and CSP exceptions applied to the view).
All I can is totally disable CSP for the view. But it's a security no-no.
Couldn't to find if selectric is able to change HTML elements behaviour by adding/removing CSS classes instead of styles directly. And... it seems that working with classes is a more progressive/safe/modern way to work with HTML elements.
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 by locating the plugin code that changes element styles during Selectric initialization and interaction, then review how those changes relate to the reported CSP warnings. The work is done when the same select behavior works without blocked inline styles and the existing behavior remains intact; the issue names no specific files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100