@font-family error: "expected pseudoclass or pseudoelement"

1,095 views
Skip to first unread message

Steven Noble

unread,
Aug 24, 2011, 8:15:38 AM8/24/11
to compas...@googlegroups.com
In my Rails app, I have:

    /public/fonts/megalopolisextra.otf
    /public/fonts/megalopolisextra.ttf

In app/stylesheets/screen.scss, I have:

    @import "compass/css3";
    @include font-face("Megalopolis", font-files("megalopolisextra.ttf", truetype, "megalopolisextra.otf", opentype));
    .header {@font-family: "Megalopolis";}

I have also tried every other variation I could think of, like:

    .header {@font-family: Megalopolis;}

Why am I getting this error in Compass?

    Invalid CSS after "  @font-family:": expected pseudoclass or pseudoelement, was " "Megalopolis";"

Many thanks!

Steven.

Chris Eppstein

unread,
Aug 31, 2011, 1:05:52 PM8/31/11
to compas...@googlegroups.com
Just remove the @ sign.  @font-face is a directive (at-rule) because it is a processor instruction that registers a font face with a font family name. font-family is just a property. 

Hunt & pecked on my iPhone... Sorry if it's brief!
--
You received this message because you are subscribed to the Google Groups "Compass" group.
To view this discussion on the web visit https://groups.google.com/d/msg/compass-users/-/RHdw0psXhmsJ.
To post to this group, send email to compas...@googlegroups.com.
To unsubscribe from this group, send email to compass-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/compass-users?hl=en.
Reply all
Reply to author
Forward
0 new messages