2011-04-20 12:29:01 +00:00
<?xml version="1.0" encoding="utf-8"?>
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" lang = "fr" xml:lang = "fr" >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=UTF-8" / >
< meta name = "keywords" content = "CSS, web, programming, Chrome, Safari, Firefox" >
2011-04-20 13:56:52 +00:00
< link rel = "shortcut icon" type = "image/x-icon" href = "/Scratch/img/favicon.ico" / >
< link rel = "stylesheet" type = "text/css" href = "/Scratch/assets/css/main.css" / >
< link rel = "stylesheet" type = "text/css" href = "/Scratch/css/twilight.css" / >
< link rel = "stylesheet" type = "text/css" href = "/Scratch/css/idc.css" / >
2011-04-20 12:29:01 +00:00
< link rel = "alternate" type = "application/rss+xml" title = "RSS" href = "http://feeds.feedburner.com/yannespositocomen" / >
2011-04-20 13:56:52 +00:00
< link rel = "alternate" lang = "fr" xml:lang = "fr" title = "N'utilisez pas de gradients avec Chrome" type = "text/html" hreflang = "fr" href = "/Scratch/fr/blog/2010-07-07-CSS-rendering-problems-by-navigator/" / >
< link rel = "alternate" lang = "en" xml:lang = "en" title = "Do not use CSS gradient with Chrome" type = "text/html" hreflang = "en" href = "/Scratch/en/blog/2010-07-07-CSS-rendering-problems-by-navigator/" / >
< script type = "text/javascript" src = "/Scratch/js/jquery-1.3.1.min.js" > < / script >
< script type = "text/javascript" src = "/Scratch/js/jquery.cookie.js" > < / script >
< script type = "text/javascript" src = "/Scratch/js/index.js" > < / script >
2011-04-20 12:29:01 +00:00
<!-- [if lt IE 9]>
< script src = "http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js" > < / script >
<![endif]-->
< title > Do not use CSS gradient with Chrome< / title >
< / head >
2011-10-18 22:30:00 +00:00
< body lang = "en" class = "article" >
2011-04-20 12:29:01 +00:00
< script type = "text/javascript" > / / < ! [ C D A T A [
2011-04-20 13:56:52 +00:00
document.write('< div id = "blackpage" > < img src = "/Scratch/img/loading.gif" alt = "loading..." / > < / div > ');
2011-04-20 12:29:01 +00:00
// ]]>
< / script >
< div id = "content" >
< div id = "choix" >
< div class = "return" > < a href = "#entete" > ↓ Menu ↓ < / a > < / div >
< div id = "choixlang" >
2011-04-20 13:56:52 +00:00
< a href = "/Scratch/fr/blog/2010-07-07-CSS-rendering-problems-by-navigator/" onclick = "setLanguage('fr')" > en Français< / a >
2011-04-20 12:29:01 +00:00
< / div >
2011-09-28 16:05:55 +00:00
< div class = "flush" > < / div >
2011-04-20 12:29:01 +00:00
< / div >
< div id = "titre" >
< h1 >
Do not use CSS gradient with Chrome
< / h1 >
< / div >
< div class = "flush" > < / div >
< div class = "flush" > < / div >
< div id = "afterheader" >
< div class = "corps" >
< p > Some < a href = "http://reddit.com" > Reddit< / a > users reported my website was really long to load and to scroll.
2011-12-07 16:37:23 +00:00
They thinks it was because of the ‘ 1px shadow’ I apply on all the text.
2011-04-20 12:29:01 +00:00
I was a bit surprised, because I make some test into a really < em > slow< / em > virtual machine. And all have always worked fine. In fact, what slow down so much are by order of importance:< / p >
< ol >
< li > Radial gradient on Chrome (not in Safari on Mac)< / li >
< li > Box shadows on Firefox and Chrome< / li >
< / ol >
< h2 id = "gradient" > Gradient< / h2 >
< p > On Safari on Mac there is absolutely no rendering time problem. But when I use Chrome under Linux it is almost unusable.< / p >
< p > Safari and Chrome use webkit, when you access my website with javascript enabled, an additionnal browser specific CSS is loaded. Until now I switched only between: IE, Mozilla and Webkit. Now I added one more special case for Chrome. Now I continue to use gradient for Safari but no more on Chrome.< / p >
2011-12-07 16:37:23 +00:00
< p > I didn’ t tried to verify the efficiency of all new CSS 3 features. But I advise you not to use < strong > < code > -webkit-gradient< / code > < / strong > on Chrome. At least when the host is a Linux.< / p >
2011-04-20 12:29:01 +00:00
< h2 id = "box-shadows" > Box Shadows< / h2 >
< p > I also detected that < strong > < code > -moz-box-shadow< / code > < / strong > elements slow down the rendering on Firefox under Linux. But there was very few time rendering issue with Safari on Mac.< / p >
< h2 id = "text-shadows" > Text Shadows< / h2 >
2011-12-07 16:37:23 +00:00
< p > Many tell me to use text-shadows sparingly. But I believe it was not the real reason of the slow down. This is why I’ ll get them back.< / p >
2011-04-20 12:29:01 +00:00
< h2 id = "conclusion" > Conclusion< / h2 >
< p > Do not use < strong > < code > -webkit-gradient< / code > < / strong > on Chrome browser yet.
Try to use < strong > < code > -moz-box-shadow< / code > < / strong > sparingly.< / p >
< / div >
< div id = "choixrss" >
< a id = "rss" href = "http://feeds.feedburner.com/yannespositocomen" >
Subscribe
< / a >
< / div >
< script type = "text/javascript" >
$(document).ready(function(){
$('#comment').hide();
$('#clickcomment').click(showComments);
});
function showComments() {
$('#comment').show();
$('#clickcomment').fadeOut();
}
document.write('< div id = "clickcomment" > Comments< / div > ');
< / script >
< div class = "flush" > < / div >
< div class = "corps" id = "comment" >
< h2 class = "first" > comments< / h2 >
< noscript >
You must enable javascript to comment.
< / noscript >
< script type = "text/javascript" >
var idcomments_acct = 'a307f0044511ff1b5cfca573fc0a52e7';
2011-04-20 13:56:52 +00:00
var idcomments_post_id = '/Scratch/en/blog/2010-07-07-CSS-rendering-problems-by-navigator/';
var idcomments_post_url = 'http://yannesposito.com/Scratch/en/blog/2010-07-07-CSS-rendering-problems-by-navigator/';
2011-04-20 12:29:01 +00:00
< / script >
< span id = "IDCommentsPostTitle" style = "display:none" > < / span >
2011-04-20 13:56:52 +00:00
< script type = 'text/javascript' src = '/Scratch/js/genericCommentWrapperV2.js' > < / script >
2011-04-20 12:29:01 +00:00
< / div >
< div id = "entete" class = "corps_spaced" >
< div id = "liens" >
2011-04-20 13:56:52 +00:00
< ul > < li > < a href = "/Scratch/en/" > Home< / a > < / li >
< li > < a href = "/Scratch/en/blog/" > Blog< / a > < / li >
< li > < a href = "/Scratch/en/softwares/" > Softwares< / a > < / li >
< li > < a href = "/Scratch/en/about/" > About< / a > < / li > < / ul >
2011-04-20 12:29:01 +00:00
< / div >
< div class = "flush" > < / div >
< hr / >
< div id = "next_before_articles" >
< div id = "previous_articles" >
previous entries
< div class = "previous_article" >
2011-04-20 13:56:52 +00:00
< a href = "/Scratch/en/blog/2010-07-05-Cappuccino-and-Web-applications/" > < span class = "nicer" > «< / span > Cappuccino vs jQuery< / a >
2011-04-20 12:29:01 +00:00
< / div >
< div class = "previous_article" >
2011-04-20 13:56:52 +00:00
< a href = "/Scratch/en/blog/2010-06-19-jQuery-popup-the-easy-way/" > < span class = "nicer" > «< / span > jQuery popup the easy way< / a >
2011-04-20 12:29:01 +00:00
< / div >
< div class = "previous_article" >
2011-04-20 13:56:52 +00:00
< a href = "/Scratch/en/blog/2010-06-17-hide-yourself-to-analytics/" > < span class = "nicer" > «< / span > Hide Yourself to your Analytics< / a >
2011-04-20 12:29:01 +00:00
< / div >
< / div >
< div id = "next_articles" >
next entries
< div class = "next_article" >
2011-04-20 13:56:52 +00:00
< a href = "/Scratch/en/blog/2010-07-31-New-style-after-holidays/" > New style after holidays < span class = "nicer" > »< / span > < / a >
2011-04-20 12:29:01 +00:00
< / div >
< div class = "next_article" >
2011-04-20 13:56:52 +00:00
< a href = "/Scratch/en/blog/2010-07-09-Indecidabilities/" > Undecidabilities (part 1) < span class = "nicer" > »< / span > < / a >
2011-04-20 12:29:01 +00:00
< / div >
< div class = "next_article" >
2011-04-20 13:56:52 +00:00
< a href = "/Scratch/en/blog/2010-08-23-Now-heberged-on-heroku/" > Now hosted by heroku < span class = "nicer" > »< / span > < / a >
2011-04-20 12:29:01 +00:00
< / div >
< / div >
< div class = "flush" > < / div >
< / div >
< / div >
< div id = "bottom" >
< div >
< a rel = "license" href = "http://creativecommons.org/licenses/by-sa/3.0/" > Copyright ©, Yann Esposito< / a >
< / div >
< div id = "lastmod" >
Created: 07/07/2010
Modified: 10/07/2010
< / div >
< div >
Entirely done with
< a href = "http://www.vim.org" > Vim< / a >
and
< a href = "http://nanoc.stoneship.org" > nanoc< / a >
< / div >
< div >
2011-04-20 13:56:52 +00:00
< a href = "/Scratch/en/validation/" > Validation< / a >
2011-04-20 12:29:01 +00:00
< a href = "http://validator.w3.org/check?uri=referer" > [xhtml] < / a >
.
< a href = "http://jigsaw.w3.org/css-validator/check/referer?profile=css3" > [css] < / a >
.
2011-04-20 13:56:52 +00:00
< a href = "http://validator.w3.org/feed/check.cgi?url=http%3A//yannesposito.com/Scratch/en/blog/feed/feed.xml" > [rss]< / a >
2011-04-20 12:29:01 +00:00
< / div >
< / div >
< div class = "clear" > < / div >
< / div >
< / body >
< / html >