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

CSS CSS Basics (2014) Enhancing the Design With CSS Web Fonts with @font-face

Both src's in @font-face rule are highlighted in red as if there is an error... Also saw it like that in the video.

@font-face {
  font-family: 'Abolition Regular';
  src: url('../fonts/abolition-regular-webfont.eot');
  src: url('../fonts/abolition-regular-webfont.eot?#iefix') format('embedded-opentype'),
       url('../fonts/abolition-regular-webfont.woff') format('woff'),
       url('../fonts/abolition-regular-webfont.ttf') format('truetype');
}

In my Workspace, the two "src" parts (just the src itself) are highlighted in red as if there is some sort of syntax error, or something left off the code some place. However, when I refresh the preview page, everything comes up correctly. Watching the video, Guil has the same thing showing and nothing was ever changed to clear that up.

Is Workspace thinking that something is wrong in the property/value stuff, or is there actually something wrong in my code, as well as Guils despite everything being rendered correctly?

2 Answers

Mary-Ann Burton
Mary-Ann Burton
15,834 Points

It's just a workspace glitch, no actual problems with the code. If you plug the code into another text editor, for example I use Sublime Text, the editor doesn't find any errors with the code.

screengrab of sublime

Hope this answers your question :)

Bojan Mujadin
Bojan Mujadin
6,049 Points

That is happening in other videos sometimes too, and a teacher doesn't fix it. There is nothing wrong in your case. If you remove semicolon after 'Abolition Regular' red highlight will disappear but then that is not correct, font won't be rendered correct. That may be the error in Workspace sometimes. Anyway, everything is ok with your code.