Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

Josh Pollock
Josh Pollock
8,757 Points

Does Sublime Text 2 not have support for certain CSS features?

I'm working on building out some extra pages for the Lake Tahoe page Guil builds in the CSS basics course as part of the front-end development track. I have a fully licensed version of Sublime Text 2, but, when styling my main header, I try to use features such as linear-gradient() and background-size: they just show up in the editor in white, plain text, not the colored italicized text of other CSS properties, and they don't work in the browser. All of my other CSS in the stylesheet is working fine, and I've checked and made absolutely sure that my class selector is typed properly and matches. The padding and height elements I've added to the header are working fine, just not the gradients and sizing relative to the background. Do I need to upgrade to a newer version of Sublime Text?

I'm having the same problem, using ST2 trying to add a linear-gradient with no luck. I doubt it's the browser because if I use Treehouse workspaces to create the gradient I can see it fine on my version of chrome. Not so with sublime text. Have you or anyone else figured out a way around this yet?

The best thing I've found (and it doesn't exactly work for me) is this:

Use this code: background: linear-gradient (rgb(0, 190, 0), transparent 90%); background: -webkit-linear-gradient(rgb(0, 190, 0), transparent 90%); background: -moz-linear-gradient(rgb(0, 190, 0), transparent 90%); background: -o-linear-gradient(rgb(0, 190, 0), transparent 90%); background: -ms-linear-gradient(rgb(0, 190, 0), transparent 90%); background: linear-gradient(rgb(0, 190, 0), transparent 90%); display: -webkit-box; display: -moz-box; display: box; background: rgb(0, 190, 0) url("../img/something.jpg");

Instead of this code: background: linear-gradient (rgb(0, 190, 0), transparent 90%), rgb(0, 190, 0) url("../img/something.jpg");

But it's messing with the layout of my page. So while I'm waiting on a fix I just used https://snappa.io/app to create the edited image the way I wanted it and used it that way. Not the best solution because I can't easily change the gradient, but it works for now.

2 Answers

Ashvin Mbuguni
Ashvin Mbuguni
6,360 Points

Hi Josh, did you manage to find a solution for this? I am currently encountering the same problem. It is as if Sublime Text 2 doesn't recognise it as a function.

Hi Josh,

This is likely a browser issue and not related to Sublime Text. Sublime Text is basically just a text editor. What browser are you using and what version? For linear gradient have you tried it with vendor prefixes to see if that works in your browser?