The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.
Closed Thread
 
Thread Tools Display Modes
  #1  
Old 03-17-2011, 01:00 AM
VNV Boutique's Avatar
VNV Boutique is offline
 
Join Date: Mar 2011
Location: Melbourne, Australia
Posts: 7
Default

@Font-face


Hey guys, loving your product so far.

Slight issue though as much as I've tried I can't seem to get @font-face working.

We have a test deployment here if you want to see what we are up to:

Or this may be better for you: https://vnv.ecwid.com/simple-store

This is the code we are currently testing:

Code:
<script>var ecwid_nocssrewrite = true;</script>
@font-face {
font-family: "Inconsolata";
src: url(http://www.vnvboutique.com/fonts/Inconsolata.ttf) format("truetype");
}

.ecwid div, .ecwid span, .ecwid a, .ecwid p{
font-family: "Inconsolata", Georgia, serif !important;
}
I apologize in advance if this is just a stupid mistake on my part!

- David.

Last edited by VNV Boutique; 03-17-2011 at 01:08 AM.
  #2  
Old 03-17-2011, 03:42 PM
Eugene Rimmer's Avatar
Eugene Rimmer Eugene Rimmer is offline
Senior Member
 
Join Date: Jan 2011
Location: Ecwid headquarters
Posts: 7,765
Default

You shouldn't have the <script> tag inside the CSS in the first place. It raises the syntax error and for many browsers the remaining part of the CSS is considered invalid and is not taken into account while rendering.

The ecwid_nocssrewrite declaration is meant to stay in your shopping page markup, if you prefer to take care of your CSS rules' specificity by yourself, not relying on our automatic prefixing system. This option works for all your CSS theme and cannot be enabled conditionally for a part of it. Using this option is usually not recommended, unless you are totally sure of what you are doing.

What you should do now is to take the @font-face declaration into manually created outer CSS linked to your shopping page, but leave the declarations for font-family inside the Ecwid CSS theme.
  #3  
Old 03-17-2011, 05:09 PM
VNV Boutique's Avatar
VNV Boutique VNV Boutique is offline
 
Join Date: Mar 2011
Location: Melbourne, Australia
Posts: 7
Default

Thanks heaps Eugene,

I must have miss read the instructions on another post.

Just to make it clear to anyone who may scratch their heads about this:

Take your @font-face declarations and put them in the CSS file used by your website (eg: style.css). In my case I was using a google web font so I just used @import instead.

Code:
@import url(http://fonts.googleapis.com/css?family=Inconsolata);
Seems to work fine.

Obviously this means that the declarations won't work when Ecwid is being used on facebook or any other websites that you are using it on.

Just out of curiosity why can't we make the @import or @font-face declarations in the Ecwid CSS?
  #4  
Old 03-20-2011, 03:21 PM
Eugene Rimmer's Avatar
Eugene Rimmer Eugene Rimmer is offline
Senior Member
 
Join Date: Jan 2011
Location: Ecwid headquarters
Posts: 7,765
Default

Unfortunately, it is not quite right to use @import rule - it must go before any other rules in CSS (except for @charset), but the theme you edit from Ecwid control panel is actually appended to the end of original Ecwid CSS file that defines our default style. Hence even if you use @import in the very beginning of your theme, it will still not be the first in the file.

Actually we are working on correctly supporting the @font-face inside of our themes, it will be available in one of our upcoming releases.
  #5  
Old 03-23-2011, 01:51 AM
VNV Boutique's Avatar
VNV Boutique VNV Boutique is offline
 
Join Date: Mar 2011
Location: Melbourne, Australia
Posts: 7
Default

Thanks for the explanation Eugene, it's pretty much what I was expecting the reason to be.

Looking forward to future releases!
Closed Thread
The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:53 PM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.