Foren

CSS3 gradient and SASS compiler

thumbnail
Brandt Solovij, geändert vor 11 Jahren.

CSS3 gradient and SASS compiler

New Member Beiträge: 14 Beitrittsdatum: 23.03.12 Neueste Beiträge
Hi all thanks in advance - I'm trying to style a gradient, the sass compiler doesn't complain at build time but on deployment "raw css" is spit out into the console with no meaningful error message and of course, the element is not styled as intended.

Here's the css:

.gradient-styled-class {
		display:inline-block;
		position:relative;
		width:auto;
		margin: 5px;
		background: #ffa642;
		 /* Old browsers */
		background: -moz-linear-gradient(top,  #ffa642 0%, #ff8800 61%, #ff8800 100%); /* FF3.6+ */
		background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffa642), color-stop(61%,#ff8800), color-stop(100%,#ff8800)); /* Chrome,Safari4+ */
		background: -webkit-linear-gradient(top,  #ffa642 0%,#ff8800 61%,#ff8800 100%); /* Chrome10+,Safari5.1+ */
		background: -o-linear-gradient(top,  #ffa642 0%,#ff8800 61%,#ff8800 100%); /* Opera 11.10+ */
		background: -ms-linear-gradient(top,  #ffa642 0%,#ff8800 61%,#ff8800 100%); /* IE10+ */
		background: linear-gradient(to bottom,  #ffa642 0%,#ff8800 61%,#ff8800 100%); /* W3C */
		filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffa642', endColorstr='#ff8800',GradientType=0 ); /* IE6-9 */
		border: solid 1px #ff8800;
		border-radius: 4px;
		-moz-border-radius: 4px;

		}


I did a search here and google and while I did learn about how to streamline this with a mixin - nothing mentioned this explicit syntax was illegal (nor was it clear that a mixin was necessary)

Thanks for any tips in advance!
thumbnail
Brandt Solovij, geändert vor 11 Jahren.

RE: CSS3 gradient and SASS compiler (Antwort)

New Member Beiträge: 14 Beitrittsdatum: 23.03.12 Neueste Beiträge
turns out the compiler doesn't like inline comments. Fixed.