diff --git a/.gitattributes b/.gitattributes index e09b6c71ccce3eeacdc8ba600496c2f49ec46096..d599f2d6ada9bd1defc01ac7ff181c206cc1e3f3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -250,3 +250,4 @@ ecrire/puce.gif -text ecrire/puce_rtl.gif -text /puce.gif -text /puce_rtl.gif -text +/rien.gif -text diff --git a/rien.gif b/rien.gif new file mode 100755 index 0000000000000000000000000000000000000000..73130b9919664ec9d423accc4952083c2cfbddef Binary files /dev/null and b/rien.gif differ diff --git a/spip_style.css b/spip_style.css index b43daf471f3c36c90f269e1b0ce4cb2ef17e9772..25674f8f14592eea4da2f63c27402e58ee45a4fa 100644 --- a/spip_style.css +++ b/spip_style.css @@ -156,10 +156,7 @@ input.formrecherche { * Images typographiques (via image_typo) */ .image_typo { - display: inline; -} -.texte_typo { - display: none; + behavior: url("win_png.htc"); } diff --git a/win_png.htc b/win_png.htc new file mode 100755 index 0000000000000000000000000000000000000000..cd444ae04cc09045d71176c0cced7dd0b2d33c16 --- /dev/null +++ b/win_png.htc @@ -0,0 +1,47 @@ +<public:component> +<public:attach event="onpropertychange" onevent="propertyChanged()" /> +<script> + +var supported = /MSIE (5\.5)|[6789]/.test(navigator.userAgent) && navigator.platform == "Win32"; +var realSrc; +var blankSrc = "rien.gif"; + +if (supported) fixImage(); + +function propertyChanged() { + if (!supported) return; + + var pName = event.propertyName; + if (pName != "src") return; + // if not set to blank + if ( ! new RegExp(blankSrc).test(src)) + fixImage(); +}; + +function fixImage() { + // get src + var src = element.src; + + // check for real change + if (src == realSrc) { + element.src = blankSrc; + return; + } + + if ( ! new RegExp(blankSrc).test(src)) { + // backup old src + realSrc = src; + } + + // test for png + if ( /\.png$/.test( realSrc.toLowerCase() ) ) { + // set blank image + element.src = blankSrc; + // set filter + element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + + src + "',sizingMethod='scale')"; + } +} + +</script> +</public:component> \ No newline at end of file