Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS scss file –> wrong rgba css output

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #207059
    nordpixel
    Participant

    I`ve got a problem with my css output

    .box {
    background: linear-gradient(to bottom, rgba(51, 51, 51, 0.5) 0%,rgba(51, 51, 51, 0.4) 100%), url(“../img.png”) no-repeat center right 10px;
    }

    I`ve got an Projekt with some scss Files, in one of these Files i use the css Code above.
    If i Save the scss file above directly everything is fine, but whenever i save another file in my Projects the css output is broken:

    CSS Output after directly saving:

    .box {
    background: linear-gradient(to bottom, rgba(51, 51, 51, 0.5) 0%, rgba(51, 51, 51, 0.4) 100%), url(“../img.png”) no-repeat center right 10px;
    }

    CSS Output after saving another SCSS File:

    .box {
    background: linear-gradient(to bottom, rgba(51, 51, 51, 0) 0%, rgba(51, 51, 51, 0) 100%), url(“../img/icon02.png”) no-repeat center right 10px;
    }

    the problem is within the rgba statement:
    1. Color: rgba(51, 51, 51, 0.5) –> rgba(51, 51, 51, 0)
    2. Color: rgba(51, 51, 51, 0.4) –> rgba(51, 51, 51, 0)

    Does anybody have an idea where`s my mistake?

    #207090
    nordpixel
    Participant

    Thanks for your answer Atelierbram.

    I don`t use any special sass syntax in this case. It looks like the sass compiler delete the transparency part after decimal point.

    scss: rgba(51, 51, 51, 0.5)
    compield css: rgba(51, 51, 51, 0)

    btw, I use compass for compiling my scss files, maybe there is the Problem?!

    On SassMeister.com everything looks fine (thanks for the link) :-/ It`s really strange

    #207102
    nordpixel
    Participant

    thanks for the links. I try gulp instead of compass tomorrow and report the result.

    #207384
    nordpixel
    Participant

    sorry for my late reply, but now I´ve got a solution for my problem:

    My Problem is a bug in scout, but there is a workaround for handling rgba correctly: you have to use “rgba(255, 255, 255, 5/10)” instead of “rgba(255, 255, 255, 0.5)” and everything works fine.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.