Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358503 - [formatting] CSS Formatting error - formatter copying the last attribute to end of attributes section.
Summary: [formatting] CSS Formatting error - formatter copying the last attribute to e...
Status: RESOLVED WORKSFORME
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.css (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: wst.css CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-21 20:17 EDT by Kamil CLA
Modified: 2012-10-17 16:40 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kamil CLA 2011-09-21 20:17:28 EDT
Build Identifier: I20110613-1736

Take a look. It is in eclipse text editor, CSS editing. Before formatting:
div.pageContent {
	width: 708px;
	float: left;
	left: 145px;
	left-margin: 0px 0px 0px 0px; retu: 433;
	overflow: hidden;
	margin: 5px;
	margin-top: 20px;
	box-shadow: 0 0 10px 5px black;
	border-radius: 5px;
}
after applying formatting two times (CTRL+SHIFT+F)
div.pageContent {
	width: 708px;
	float: left;
	left: 145px;
	left-margin: 0px 0px 0px 0px;
	retu: 433;
	overflow: hidden; <-- orginal position, after formatting still here
	margin: 5px;
	margin-top: 20px;
	box-shadow: 0 0 10px 5px black;
	border-radius: 5px;
	overflow: hidden; <- Eclipse formatter copies attribute from up here. Dunno why.
}

After some formats your CSS sheet become 20% bigger because of this bug.

Reproducible: Always

Steps to Reproduce:
1. Insert some CSS selectors in one line like this sel1:xx;sel2:xx;sel3:xx;
2. Apply ctrl+shift+F until selectors don't position pretty - every one in one line.
3. Take a look how CSS formatter copy the most right selector to down of attributes section.
4. If bug not appear, try to select our prepared line.
Comment 1 Nick Sandonato CLA 2012-10-17 16:40:43 EDT
This looks like it may have been fixed indirectly in the last year.