1

In Base.less I added gradient on background. After compiling I see the gradient repeating on the background. What can I do to stop repeating gradient?

body {
    font-family: 'Lato', arial, sans-serif;   
    color: @text-color;
    background:
    rgba(212,228,239,1`enter code here`);
    background: -moz-linear-gradient(-45deg, rgba(212,228,239,1) 0%, rgba(134,174,204,1) 100%);
    background: -webkit-gradient(left top, right bottom, color-stop(0%, rgba(212,228,239,1)), color-stop(100%, rgba(134,174,204,1)));
    background: -webkit-linear-gradient(-45deg, rgba(212,228,239,1) 0%, rgba(134,174,204,1) 100%);
    background: -o-linear-gradient(-45deg, rgba(212,228,239,1) 0%, rgba(134,174,204,1) 100%);
    background: -ms-linear-gradient(-45deg, rgba(212,228,239,1) 0%, rgba(134,174,204,1) 100%);
    background: linear-gradient(135deg, rgba(212,228,239,1) 0%, rgba(134,174,204,1) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d4e4ef', endColorstr='#86aecc', GradientType=1 );
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
  • Add `background-repeat: no-repeat` after all the `background` properties. That is the way to stop a gradient from repeating. If you already have this in Base.less and are saying it is not coming in the compiled output then show us the Less code. – Harry Dec 05 '15 at 04:17
  • 1
    possible duplicate of http://stackoverflow.com/questions/2869212/css3-gradient-background-set-on-body-doesnt-stretch-but-instead-repeats – Jesse van Muijden Dec 05 '15 at 14:14

0 Answers0