WordPress.com Custom CSS
Using Google Font directory with SafeCSS (1 post)

  1. Brian Krogsgard
    Posted 5 years ago #


    It seems that the SafeCSS plugin is stripping the single quotes from fonts that are used from the Google font directory. I understand this is something kses does, but am curious if there is a way to have exceptions for certain elements.

    A Google font can be called like so from a standard stylesheet:

    @import url('http://fonts.googleapis.com/css?family=Candal:regular');

    And used like so within the stylesheet:

    #h1 {
    	font: normal normal bold 55px/85px 'Candal', serif; }

    Unfortunately, neither scenario works because the plugin is stripping elements it thinks shouldn't be in the css. I can get around importing the font with a hook and using theme settings for individual sites to manipulate that, but is there a way to allow the use of single quotes in calling the Google fonts when styling an element?

    Otherwise, I may have to abandon these pretty fonts for users in a custom stylesheet : )

    Thanks for any help.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress.com Custom CSS
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

  • RSS feed for this topic
  • Started 5 years ago by Brian Krogsgard
  • This topic is not resolved
  • WordPress version: 3.1.1