openstyles / openstyles/stylus
[Suggestion] Beautify selection only
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6.9k
- Forks
- 382
- PR merge metrics
- No merged PRs in 30d
Description
It would be a cool feature to be able to only beautify the selected text block.
This helps keeping non-standard indentations like
.pausedOverlay {
text-shadow: 1px 1px 1px black,
1px -1px 1px black,
-1px 1px 1px black,
-1px -1px 1px black !important;
}
An advantage is that you can be sure nothing wrong happened to the code that is out of sight / scope.
Of course it won't respect the overall indentation e.g. from a wrapping @-moz-doc rule, but that's no problem as the text is selected anyway and can be reindented easily by pressing tab.
Another problem that might come up is beautifying multiple separated selections. To not overcomplicate it, this should simply not work.
This suggestion should be considered when realizing the unified editor for vanilla CSS and UserCSS.
We can then also get rid of the "beautify this section" button.
Contributor guide
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 unified editor for vanilla CSS and UserCSS and the existing “beautify this section” button. Define selection handling so one selected block can be beautified, multiple separated selections are rejected, and text outside the selection remains unchanged; the existing section button should then be removable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100