This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 245458 - Incorrect code-format for &:hover
Summary: Incorrect code-format for &:hover
Status: NEW
Alias: None
Product: web
Classification: Unclassified
Component: CSS Preprocessors (SASS, LESS, ...) (show other bugs)
Version: 8.0.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Milutin Kristofic
Depends on:
Reported: 2014-07-08 00:24 UTC by _ gtzabari
Modified: 2014-10-08 16:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2014-07-08 00:24:37 UTC
Product Version: NetBeans IDE Dev (Build 201407040001)
Java: 1.8.0_05; Java HotSpot(TM) 64-Bit Server VM 25.5-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13
System: Windows 7 version 6.1 running on amd64; Cp1252; en_CA (nb)
User directory: C:\Users\Gili\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\dev

When code-formatting a SCSS file, the following code formats wrong:

	background: $green;
	color: $white;
	@include font30();
	height: 60px;
	overflow: hidden;
	font-weight: 100;
	cursor: pointer;
		background-color: lighten($green, 5%)
		width: 100%
		font-size: 0.6em;
		position: relative;
		top: -1px;
		left: 0.5em

Netbeans code-formats the brace after &:hover wrong (two tabs instead of one). In contrast, the brace after &.wide code-formats fine.
Comment 1 _ gtzabari 2014-07-08 00:26:39 UTC
The problem also occurs for:

	margin-top: 20px;
	@include systemFontFamily();

Meaning, the & is irrelevant. The trigger seems to be the colon.
Comment 2 Vladimir Riha 2014-07-08 07:06:29 UTC
The 2nd case works for me, result is

    margin-top: 20px;
    @include systemFontFamily();

but the use case from description is reproducible. Reassigning to CSS Prep.

Product Version: NetBeans IDE Dev (Build 201407080001)
Java: 1.8.0_05; Java HotSpot(TM) Client VM 25.5-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13
System: Linux version 3.13.0-30-generic running on i386; UTF-8; en_US (nb)
Comment 3 Marek Fukala 2014-07-17 09:32:57 UTC
Reproducible. There's a minimum use case:

div {

Comment 4 Quality Engineering 2014-07-18 01:52:16 UTC
Integrated into 'main-silver', will be available in build *201407180001* on (upload may still be in progress)

User: Marek Fukala <>
Log: #245458 - added failing unit test
Comment 5 _ gtzabari 2014-10-08 16:57:02 UTC
The target milestone needs to be updated (8.0.1 already shipped).