CSS: Set a background color which is 50% of the width of the window

Trying to achieve a background on a page that is “split in two”; two colors on opposite sides (seemingly done by setting a default background-color on the body tag, then applying another onto a div that stretches the entire width of the window). I did come up with a solution but unfortunately the background-size property … Read more

Sass – Converting Hex to RGBa for background opacity

I have the following Sass mixin, which is a half complete modification of an RGBa example: @mixin background-opacity($color, $opacity: .3) { background: rgb(200, 54, 54); /* The Fallback */ background: rgba(200, 54, 54, $opacity); } I have applied $opacity ok, but now I am a stuck with the $color part. The colors I will be … Read more