| Summary: | Autoedit strategy for newlines in CSS should indent correctly | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Nick Sandonato <nsand.dev> | ||||
| Component: | wst.css | Assignee: | Nick Sandonato <nsand.dev> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Nick Sandonato <nsand.dev> | ||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | jaroslav.zaruba | ||||
| Version: | 3.2 | ||||||
| Target Milestone: | 3.3 M1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 176740 [details]
patch
Released. I'm not sure I do understand what 'Autoedit strategy' means here, but auto-indent in CSS editor still works in a weird way.
div|
^^ now hitting Enter should not produce this:
div
\t|
but rather this:
div
|
... and if I go along with this weird indent and create a block:
div
\t{|
\t}
^^ hitting Enter should definitely add indentation, instead what I get is this:
div
\t{
\t|
\t}
I believe the CSS-editor goes against the auto-indent habits/conventions, where the rule is quite simple: 'add indent after opening curly brace, remove indent before one, maintan indent otherwise'.
|
When adding a newline for a CSS selector, proper indentation should be added. For example: a {|} pressing Enter at the | should cause the format a { [tab]| }