user3637971
user3637971

Reputation: 315

Angular 5 Warning in Invalid selector ';

I have an angular 5 appplication. When I execute ng b --prod it shows me the following messages:

Warning in Invalid selector '; .space1x at 6219:39. Ignoring.

The style space1x in style.css is:

.space1x {
    padding-left: 200px;
}

When I see in deployed css (styles.75b74.bundle.css), the style space1x is omitted.

What is happening in this case?

Upvotes: 1

Views: 1738

Answers (2)

user3637971
user3637971

Reputation: 315

I was checking style.css and I finally solved it. I'll tell my way:

In some place of style.css contains the following instructions:

.pagination li.page-item a{color: #333};
.space1x {
    padding-left: 200px;
 }

In first line the semicolon is outside from right brace. So when I deploy by ng s --prod, angular omits space1x in style.css bundle. Therefore, the correct instruction should be like this:

.pagination li.page-item a{color: #333;}

By doing this, warning disappears and space1x is included in style.css bundle.

Upvotes: 1

abdul subaan
abdul subaan

Reputation: 91

Angular 5 with SCSS, it was working and also this class available in bundle.css file, after the build.

Upvotes: 0

Related Questions