zoltan-dulac / cssSandpaper

a CSS3 Polyfill that implements CSS3 transforms, box-shadow, gradients, opacity and RGBA/HSL/HSLA colours in browser that don't support them.
http://www.useragentman.com/blog/csssandpaper-a-css3-javascript-library/
208 stars 47 forks source link

cssSandpaper does not work with Drupal Zen theme #11

Open peterdemaeyer opened 12 years ago

peterdemaeyer commented 12 years ago

I wanted to use this library to get text-shadows in IE in my Drupal Zen subtheme, but unfortunately that doesn't work. I can make it work for a standalone example (plain HTML file with CSS alongside), but not for my Drupal Zen subtheme. I tried to debug the script with my limited knowledge of JavaScript, and this is as far as I got:

I've pin-pointed as far as function getStyleSheet(node) in cssSandpaper.css. Somehow it doesn't find any styleSheets, decides there is nothing to transform, and nothing is replaced.

peterdemaeyer commented 12 years ago

The page that works has the following in its content:

<link href="css/textShadowPeter.css" type="text/css" rel="stylesheet" />

which is correctly scanned by function getStyleSheet(node). However, the drupal page has a more complicated looking style:

<style type="text/css" media="all">
  @import url("http://192.168.0.100/ooginstituut/modules/system/system.base.css?m2dtow");
  @import url("http://192.168.0.100/ooginstituut/modules/system/system.menus.css?m2dtow");
  @import url("http://192.168.0.100/ooginstituut/modules/system/system.messages.css?m2dtow");
  @import url("http://192.168.0.100/ooginstituut/modules/system/system.theme.css?m2dtow");
</style>

Apparently the latter cannot be scanned correctly... What would it take to make cssSandpaper work for the latter type of styles?

2dareis2do commented 12 years ago

Yes, I have tried to get this working (not with drupal zen theme) and seem to be having the same problem. I have posted an issue here:

http://drupal.org/node/1660836