Rahul Dagli
Rahul Dagli

Reputation: 4502

scss not accepting percentage width

I have an scss file which contains a property width and value 100%. However, its giving an error while compiling:

{ [Error: assets/sass/components/_communities.scss
Error: Invalid CSS after "...   width: 100%": expected expression (e.g. 1px, bold), was ";"
        on line 25 of assets/sass/components/_communities.scss
        from line 39 of assets/sass/main.scss
>>             width: 100%;

Code:

.communities .communities__logo:nth-child(5) .grid__cell img {
    width: 100%;
}

What could be the reason and possible solution?

Upvotes: 1

Views: 364

Answers (1)

Aleksandar Jovanović
Aleksandar Jovanović

Reputation: 36

Try using (100%) instead of 100% or you can this function:percentage(1). It is useful when you want use for example 1/3 as argument of the function is percentage as decimal.

Upvotes: 2

Related Questions