This is a migrated thread and some comments may be shown as answers.

css file containing google fonts

4 Answers 108 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Fit2Page asked on 21 Sep 2015, 08:41 AM

Hi,

The "Apply CSS class" dropdown won't load if the css file uses Google fonts Eg.:

@import url(https://fonts.googleapis.com/css?family=Alegreya+Sans:400,100,300,500,700,800,900,900italic,800italic,700italic,500italic,400italic,300italic,100italic|Open+Sans:400,400italic);

Anything we can do about this?

Marc

 ​

4 Answers, 1 is accepted

Sort by
0
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
answered on 21 Sep 2015, 10:08 AM
MMmmm, could it be that this has to do with loading from a HTTPS location?
0
Joana
Telerik team
answered on 24 Sep 2015, 07:51 AM
Hi,

I could not reproduce the issue you have described. I am attaching a sample page where I tested the behavior.  Loading from a HTTPS should not affect the issue. Could you confirm that the css classes are loaded if Google fonts is not present in the css file? You could open a support ticket and send us a simple runnable project, so that we'll be able to examine the issue.

Regards,
Joana
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
answered on 13 Jun 2016, 09:00 AM

A bit late but....

This is not an issue of Google Fonts in de CSS.

Due to some (common) CSS syntax the stylesheet is not loaded correctly and the classes are not shown in the dropdown.

This Eg. occurs with a notation like:

a.aaa, a.bbb {color: #ffffff;}

 

When this goes OK:

 

a.aaa {color: #ffffff;}

a.bbb {color: #ffffff;}

 

Maybe you can share some info on how the CSS is read and what possibilities we have in creating the styles?

 

BR,

Marc

0
Joana
Telerik team
answered on 15 Jun 2016, 06:50 AM
Hi Marc,

The behavior you have described is expected. The RadEditor parses and read only the first a.aaa class and will not read the classes after the coma. We haven't implemented parsing algorithm after the coma, due to a performance hit which will cause it's slower loading. You could find more information about loading Css Classes in the relevant dropdown here in our documentation.

Regards,
Joana
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Editor
Asked by
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Joana
Telerik team
Share this question
or