MadLittleMods / MadLittleMods/postcss-increase-specificity
Add `options.mode` to support new `always-ascending`
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 51
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
API discussion welcome :grinning:
`options.mode`
- `additive`: Adds the same amount of specificity to each selector (this functionality is what the plugin currently handles, see [`options.repeat`](https://github.com/MadLittleMods/postcss-increase-specificity#options)
- `always-ascending`: Specificity that matches the source order. See http://philipwalton.com/articles/do-we-actually-need-specificity-in-css/
`options.useAttributeIds`: Whether to transform `#foo` into `[id="foo"]`. Somehow, maybe this should be attached to `options.mode -> always-ascending` as the [article](http://philipwalton.com/articles/do-we-actually-need-specificity-in-css/) explains
##
cc @philipwalton
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 tracing the plugin's existing options.repeat behavior and reviewing the linked specificity article. Clarify the intended API for options.mode and whether useAttributeIds belongs under always-ascending, then define tests showing additive and always-ascending selector output before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript
- Domain
- frontend, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100