PR PR
宝島社
¥990 (2024/09/22 13:28時点 | Amazon調べ)

BloggerブログのCSSの最適化及び簡素化の方法

スポンサーリンク
新着情報
2023.04.09
2023.04.06
2023.04.03
2023.03.19
スポンサーリンク
スポンサーリンク

この記事は2013年9月11日の1年以上前に書かれたものです。現在は状況が異なる可能性がありますのでご注意ください。

記事内に広告が含まれています。

BloggerブログにおけるCSSは、

<b:skin>…</b:skin>

と、

<b:template-skin>…</b:template-skin>

内に2つのCSSが存在します。

中でも1つ目の方の<skin>…<skin>の中のCSSはとても長いです。

スポンサーリンク

スポンサーリンク

それを簡素化するのに役に立っったのが以下のページ速度測定サイトです。

GTmetrix | Website Speed and Performance Optimization

上記サイトにて、
自分のブログのサイト表示速度の測定を実施してみると分析結果が下の表示されます。


既に最適化済みの分析結果ですが、
以下スクリーンショットのようになります。(CSS部分のみ)

その中で色々指摘項目はあります。

どうしようもない項目もありますが、
Minify CSS縮小するCSS)という項目をクリックすると、

簡略化(最適化)可能なCSS部分が表示されています。

そして、
サイトにて作成されたoptimized version最適化されたバージョン)をクリックすると余計なCSS部分を取り除いた、
ある意味簡略化・最適化されたCSSが表示されます。

私のブログにおける元の<b:skin>…</b:skin>内のCSSは以下内容でした。

/*
-----------------------------------------------
Blogger Template Style
Name:     Simple
Designer: Josh Peterson
URL:      www.noaesthetic.com
----------------------------------------------- */
/* Variable definitions
====================
<Variable name="keycolor" description="Main Color" type="color" default="#66bbdd"/>
<Group description="Page Text" selector="body">
<Variable name="body.font" description="Font" type="font"
default="normal normal 12px Arial, Tahoma, Helvetica, FreeSans, sans-serif"/>
<Variable name="body.text.color" description="Text Color" type="color" default="#222222"/>
</Group>
<Group description="Backgrounds" selector=".body-fauxcolumns-outer">
<Variable name="body.background.color" description="Outer Background" type="color" default="#66bbdd"/>
<Variable name="content.background.color" description="Main Background" type="color" default="#ffffff"/>
<Variable name="header.background.color" description="Header Background" type="color" default="transparent"/>
</Group>
<Group description="Links" selector=".main-outer">
<Variable name="link.color" description="Link Color" type="color" default="#2288bb"/>
<Variable name="link.visited.color" description="Visited Color" type="color" default="#888888"/>
<Variable name="link.hover.color" description="Hover Color" type="color" default="#33aaff"/>
</Group>
<Group description="Blog Title" selector=".header h1">
<Variable name="header.font" description="Font" type="font"
default="normal normal 60px Arial, Tahoma, Helvetica, FreeSans, sans-serif"/>
<Variable name="header.text.color" description="Title Color" type="color" default="#3399bb" />
</Group>
<Group description="Blog Description" selector=".header .description">
<Variable name="description.text.color" description="Description Color" type="color"
default="#777777" />
</Group>
<Group description="Tabs Text" selector=".tabs-inner .widget li a">
<Variable name="tabs.font" description="Font" type="font"
default="normal normal 14px Arial, Tahoma, Helvetica, FreeSans, sans-serif"/>
<Variable name="tabs.text.color" description="Text Color" type="color" default="#999999"/>
<Variable name="tabs.selected.text.color" description="Selected Color" type="color" default="#000000"/>
</Group>
<Group description="Tabs Background" selector=".tabs-outer .PageList">
<Variable name="tabs.background.color" description="Background Color" type="color" default="#f5f5f5"/>
<Variable name="tabs.selected.background.color" description="Selected Color" type="color" default="#eeeeee"/>
</Group>
<Group description="Post Title" selector="h3.post-title, .comments h4">
<Variable name="post.title.font" description="Font" type="font"
default="normal normal 22px Arial, Tahoma, Helvetica, FreeSans, sans-serif"/>
</Group>
<Group description="Date Header" selector=".date-header">
<Variable name="date.header.color" description="Text Color" type="color"
default="#cccccc"/>
<Variable name="date.header.background.color" description="Background Color" type="color"
default="transparent"/>
</Group>
<Group description="Post Footer" selector=".post-footer">
<Variable name="post.footer.text.color" description="Text Color" type="color" default="#666666"/>
<Variable name="post.footer.background.color" description="Background Color" type="color"
default="#f9f9f9"/>
<Variable name="post.footer.border.color" description="Shadow Color" type="color" default="#eeeeee"/>
</Group>
<Group description="Gadgets" selector="h2">
<Variable name="widget.title.font" description="Title Font" type="font"
default="normal bold 11px Arial, Tahoma, Helvetica, FreeSans, sans-serif"/>
<Variable name="widget.title.text.color" description="Title Color" type="color" default="#000000"/>
<Variable name="widget.alternate.text.color" description="Alternate Color" type="color" default="#999999"/>
</Group>
<Group description="Images" selector=".main-inner">
<Variable name="image.background.color" description="Background Color" type="color" default="#ffffff"/>
<Variable name="image.border.color" description="Border Color" type="color" default="#eeeeee"/>
<Variable name="image.text.color" description="Caption Text Color" type="color" default="#cccccc"/>
</Group>
<Group description="Accents" selector=".content-inner">
<Variable name="body.rule.color" description="Separator Line Color" type="color" default="#eeeeee"/>
<Variable name="tabs.border.color" description="Tabs Border Color" type="color" default="#404040"/>
</Group>
<Variable name="body.background" description="Body Background" type="background"
color="#000000" default="$(color) none repeat scroll top left"/>
<Variable name="body.background.override" description="Body Background Override" type="string" default=""/>
<Variable name="body.background.gradient.cap" description="Body Gradient Cap" type="url"
default="url(//www.blogblog.com/1kt/simple/gradients_light.png)"/>
<Variable name="body.background.gradient.tile" description="Body Gradient Tile" type="url"
default="url(//www.blogblog.com/1kt/simple/body_gradient_tile_light.png)"/>
<Variable name="content.background.color.selector" description="Content Background Color Selector" type="string" default=".content-inner"/>
<Variable name="content.padding" description="Content Padding" type="length" default="10px"/>
<Variable name="content.padding.horizontal" description="Content Horizontal Padding" type="length" default="10px"/>
<Variable name="content.shadow.spread" description="Content Shadow Spread" type="length" default="40px"/>
<Variable name="content.shadow.spread.webkit" description="Content Shadow Spread (WebKit)" type="length" default="5px"/>
<Variable name="content.shadow.spread.ie" description="Content Shadow Spread (IE)" type="length" default="10px"/>
<Variable name="main.border.width" description="Main Border Width" type="length" default="0"/>
<Variable name="header.background.gradient" description="Header Gradient" type="url" default="none"/>
<Variable name="header.shadow.offset.left" description="Header Shadow Offset Left" type="length" default="-1px"/>
<Variable name="header.shadow.offset.top" description="Header Shadow Offset Top" type="length" default="-1px"/>
<Variable name="header.shadow.spread" description="Header Shadow Spread" type="length" default="1px"/>
<Variable name="header.padding" description="Header Padding" type="length" default="30px"/>
<Variable name="header.border.size" description="Header Border Size" type="length" default="1px"/>
<Variable name="header.bottom.border.size" description="Header Bottom Border Size" type="length" default="1px"/>
<Variable name="header.border.horizontalsize" description="Header Horizontal Border Size" type="length" default="0"/>
<Variable name="description.text.size" description="Description Text Size" type="string" default="140%"/>
<Variable name="tabs.margin.top" description="Tabs Margin Top" type="length" default="0" />
<Variable name="tabs.margin.side" description="Tabs Side Margin" type="length" default="30px" />
<Variable name="tabs.background.gradient" description="Tabs Background Gradient" type="url"
default="url(//www.blogblog.com/1kt/simple/gradients_light.png)"/>
<Variable name="tabs.border.width" description="Tabs Border Width" type="length" default="1px"/>
<Variable name="tabs.bevel.border.width" description="Tabs Bevel Border Width" type="length" default="1px"/>
<Variable name="date.header.padding" description="Date Header Padding" type="string" default="inherit"/>
<Variable name="date.header.letterspacing" description="Date Header Letter Spacing" type="string" default="inherit"/>
<Variable name="date.header.margin" description="Date Header Margin" type="string" default="inherit"/>
<Variable name="post.margin.bottom" description="Post Bottom Margin" type="length" default="25px"/>
<Variable name="image.border.small.size" description="Image Border Small Size" type="length" default="2px"/>
<Variable name="image.border.large.size" description="Image Border Large Size" type="length" default="5px"/>
<Variable name="page.width.selector" description="Page Width Selector" type="string" default=".region-inner"/>
<Variable name="page.width" description="Page Width" type="string" default="auto"/>
<Variable name="main.section.margin" description="Main Section Margin" type="length" default="15px"/>
<Variable name="main.padding" description="Main Padding" type="length" default="15px"/>
<Variable name="main.padding.top" description="Main Padding Top" type="length" default="30px"/>
<Variable name="main.padding.bottom" description="Main Padding Bottom" type="length" default="30px"/>
<Variable name="paging.background"
color="#333333"
description="Background of blog paging area" type="background"
default="transparent none no-repeat scroll top center"/>
<Variable name="footer.bevel" description="Bevel border length of footer" type="length" default="0"/>
<Variable name="mobile.background.overlay" description="Mobile Background Overlay" type="string"
default="transparent none repeat scroll top left"/>
<Variable name="mobile.background.size" description="Mobile Background Size" type="string" default="auto"/>
<Variable name="mobile.button.color" description="Mobile Button Color" type="color" default="#ffffff" />
<Variable name="startSide" description="Side where text starts in blog language" type="automatic" default="left"/>
<Variable name="endSide" description="Side where text ends in blog language" type="automatic" default="right"/>
*/
/* Content
----------------------------------------------- */
body {
font: normal normal 12px Arial, Tahoma, Helvetica, FreeSans, sans-serif;
color: #cccccc;
background: #000000 none repeat scroll top left;
padding: 0 40px 40px 40px;
}
html body .region-inner {
min-width: 0;
max-width: 100%;
width: auto;
}
a:link {
text-decoration:none;
color: #fff1d2;
}
a:visited {
text-decoration:none;
color: #f0c99e;
}
a:hover {
text-decoration:underline;
color: #0065dd;
}
.body-fauxcolumn-outer .fauxcolumn-inner {
background: transparent none repeat scroll top left;
_background-image: none;
}
.body-fauxcolumn-outer .cap-top {
position: absolute;
z-index: 1;
height: 400px;
width: 100%;
background: #000000 none repeat scroll top left;
}
.body-fauxcolumn-outer .cap-top .cap-left {
width: 100%;
background: transparent none repeat-x scroll top left;
_background-image: none;
}
.content-outer {
-moz-box-shadow: 0 0 40px rgba(0, 0, 0, .15);
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .15);
-goog-ms-box-shadow: 0 0 10px #333333;
box-shadow: 0 0 40px rgba(0, 0, 0, .15);
margin-bottom: 1px;
}
.content-inner {
padding: 10px 10px;
}
.content-inner {
background-color: #333333;
}
/* Header
----------------------------------------------- */
.header-outer {
background: transparent none repeat-x scroll 0 -400px;
_background-image: none;
}
.Header h1 {
font: normal normal 60px Arial, Tahoma, Helvetica, FreeSans, sans-serif;
color: #ffffff;
text-shadow: -1px -1px 1px rgba(0, 0, 0, .2);
}
.Header h1 a {
color: #ffffff;
}
.Header .description {
font-size: 140%;
color: #dfb97a;
}
.header-inner .Header .titlewrapper {
padding: 22px 30px;
}
.header-inner .Header .descriptionwrapper {
padding: 0 30px;
}
/* Tabs
----------------------------------------------- */
.tabs-inner .section:first-child {
border-top: 1px solid #404040;
}
.tabs-inner .section:first-child ul {
margin-top: -1px;
border-top: 1px solid #404040;
border-left: 0 solid #404040;
border-right: 0 solid #404040;
}
.tabs-inner .widget ul {
background: #222222 none repeat-x scroll 0 -800px;
_background-image: none;
border-bottom: 1px solid #404040;
margin-top: 0;
margin-left: -30px;
margin-right: -30px;
}
.tabs-inner .widget li a {
display: inline-block;
padding: .6em 1em;
font: normal normal 14px Arial, Tahoma, Helvetica, FreeSans, sans-serif;
color: #ffffff;
border-left: 1px solid #333333;
border-right: 0 solid #404040;
}
.tabs-inner .widget li:first-child a {
border-left: none;
}
.tabs-inner .widget li.selected a, .tabs-inner .widget li a:hover {
color: #ffffff;
background-color: #000000;
text-decoration: none;
}
/* Columns
----------------------------------------------- */
.main-outer {
border-top: 0 solid #404040;
}
.fauxcolumn-left-outer .fauxcolumn-inner {
border-right: 1px solid #404040;
}
.fauxcolumn-right-outer .fauxcolumn-inner {
border-left: 1px solid #404040;
}
/* Headings
----------------------------------------------- */
h2 {
margin: 0 0 1em 0;
font: normal bold 16px Arial, Tahoma, Helvetica, FreeSans, sans-serif;
color: #ffffff;
}
/* Widgets
----------------------------------------------- */
.widget .zippy {
color: #999999;
text-shadow: 2px 2px 1px rgba(0, 0, 0, .1);
}
.widget .popular-posts ul {
list-style: none;
}
/* Posts
----------------------------------------------- */
.date-header span {
background-color: transparent;
color: #cccccc;
padding: inherit;
letter-spacing: inherit;
margin: inherit;
}
.main-inner {
padding-top: 30px;
padding-bottom: 30px;
}
.main-inner .column-center-inner {
padding: 0 15px;
}
.main-inner .column-center-inner .section {
margin: 0 15px;
}
.post {
margin: 0 0 25px 0;
}
h3.post-title, .comments h4 {
font: normal normal 22px Arial, Tahoma, Helvetica, FreeSans, sans-serif;
margin: .75em 0 0;
}
.post-body {
font-size: 110%;
line-height: 1.4;
position: relative;
}
.post-body img, .post-body .tr-caption-container, .Profile img, .Image img,
.BlogList .item-thumbnail img {
padding: 0;
background: #111111;
border: 1px solid #111111;
-moz-box-shadow: 1px 1px 5px rgba(0, 0, 0, .1);
-webkit-box-shadow: 1px 1px 5px rgba(0, 0, 0, .1);
box-shadow: 1px 1px 5px rgba(0, 0, 0, .1);
}
.post-body img, .post-body .tr-caption-container {
padding: 1px;
}
.post-body .tr-caption-container {
color: #cccccc;
}
.post-body .tr-caption-container img {
padding: 0;
background: transparent;
border: none;
-moz-box-shadow: 0 0 0 rgba(0, 0, 0, .1);
-webkit-box-shadow: 0 0 0 rgba(0, 0, 0, .1);
box-shadow: 0 0 0 rgba(0, 0, 0, .1);
}
.post-header {
margin: 0 0 1.5em;
line-height: 1.6;
font-size: 90%;
}
.post-footer {
margin: 20px -2px 0;
padding: 5px 10px;
color: #888888;
background-color: #303030;
border-bottom: 1px solid #444444;
line-height: 1.6;
font-size: 90%;
}
#comments .comment-author {
padding-top: 1.5em;
border-top: 1px solid #404040;
background-position: 0 1.5em;
}
#comments .comment-author:first-child {
padding-top: 0;
border-top: none;
}
.avatar-image-container {
margin: .2em 0 0;
}
#comments .avatar-image-container img {
border: 1px solid #111111;
}
/* Comments
----------------------------------------------- */
.comments .comments-content .icon.blog-author {
background-repeat: no-repeat;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9sLFwMeCjjhcOMAAAD+SURBVDjLtZSvTgNBEIe/WRRnm3U8RC1neQdsm1zSBIU9VVF1FkUguQQsD9ITmD7ECZIJSE4OZo9stoVjC/zc7ky+zH9hXwVwDpTAWWLrgS3QAe8AZgaAJI5zYAmc8r0G4AHYHQKVwII8PZrZFsBFkeRCABYiMh9BRUhnSkPTNCtVXYXURi1FpBDgArj8QU1eVXUzfnjv7yP7kwu1mYrkWlU33vs1QNu2qU8pwN0UpKoqokjWwCztrMuBhEhmh8bD5UDqur75asbcX0BGUB9/HAMB+r32hznJgXy2v0sGLBcyAJ1EK3LFcbo1s91JeLwAbwGYu7TP/3ZGfnXYPgAVNngtqatUNgAAAABJRU5ErkJggg==);
}
.comments .comments-content .loadmore a {
border-top: 1px solid #999999;
border-bottom: 1px solid #999999;
}
.comments .comment-thread.inline-thread {
background-color: #303030;
}
.comments .continue {
border-top: 2px solid #999999;
}
/* Accents
---------------------------------------------- */
.section-columns td.columns-cell {
border-left: 1px solid #404040;
}
.blog-pager {
background: transparent none no-repeat scroll top center;
}
.blog-pager-older-link, .home-link,
.blog-pager-newer-link {
background-color: #333333;
padding: 5px;
}
.footer-outer {
border-top: 0 dashed #bbbbbb;
}
/* Mobile
----------------------------------------------- */
body.mobile  {
background-size: auto;
}
.mobile .body-fauxcolumn-outer {
background: transparent none repeat scroll top left;
}
.mobile .body-fauxcolumn-outer .cap-top {
background-size: 100% auto;
}
.mobile .content-outer {
-webkit-box-shadow: 0 0 3px rgba(0, 0, 0, .15);
box-shadow: 0 0 3px rgba(0, 0, 0, .15);
}
body.mobile .AdSense {
margin: 0 -40px;
}
.mobile .tabs-inner .widget ul {
margin-left: 0;
margin-right: 0;
}
.mobile .post {
margin: 0;
}
.mobile .main-inner .column-center-inner .section {
margin: 0;
}
.mobile .date-header span {
padding: 0.1em 10px;
margin: 0 -10px;
}
.mobile h3.post-title {
margin: 0;
}
.mobile .blog-pager {
background: transparent none no-repeat scroll top center;
}
.mobile .footer-outer {
border-top: none;
}
.mobile .main-inner, .mobile .footer-inner {
background-color: #333333;
}
.mobile-index-contents {
color: #cccccc;
}
.mobile-link-button {
background-color: #fff1d2;
}
.mobile-link-button a:link, .mobile-link-button a:visited {
color: #ffffff;
}
.mobile .tabs-inner .section:first-child {
border-top: none;
}
.mobile .tabs-inner .PageList .widget-content {
background-color: #000000;
color: #ffffff;
border-top: 1px solid #404040;
border-bottom: 1px solid #404040;
}
.mobile .tabs-inner .PageList .widget-content .pagelist-arrow {
border-left: 1px solid #404040;
}
.Header h1 a:hover {
color: #9fc5e8; //Sample
}
/* backtotop */
#back-top {
position: fixed;
bottom: 5px;
right: 20px;
margin-left: 85%;
}
#back-top a {
width: 108px;
display: block;
text-align: center;
font: 11px/100% Arial, Helvetica, sans-serif;
text-transform: uppercase;
text-decoration: none;
color: #bbb;
/* transition */
-webkit-transition: 1s;
-moz-transition: 1s;
transition: 1s;
}
#back-top a:hover {
color: #000;
}
/* arrow icon (span tag) */
#back-top span {
width: 50px;
height: 50px;
display: block;
margin-bottom: 0px;
background: #eae5e3 url(http://3.bp.blogspot.com/-6uLA1SuNifo/UWCeck_iF2I/AAAAAAAAAB4/pQmLFSwqdOE/s1600/go_top.png) no-repeat center center;
/* rounded corners */
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
/* transition */
-webkit-transition: 1s;
-moz-transition: 1s;
transition: 1s;
}
#back-top a:hover span {
opacity:0.5;
filter:alpha(opacity=50)
background-color: #eee;
}
#fixed-box{position: fixed;top: 10px;z-index: 0;} .footer-outer {position: relative;z-index: 1;background-color: #FCFCFC;}
blockquote {
position: relative;
padding: 20px 50px;
min-height: 20px;
background: url(http://3.bp.blogspot.com/-px-RVucfs90/UWIfqe2zGMI/AAAAAAAAAD4/bkYfg_92M48/s1600/inyoleft.png) no-repeat 10px 10px #444444;
}
blockquote:after {
position: absolute;
bottom: 10px; right: 10px;
content: url(http://1.bp.blogspot.com/-fVn1Z8gHTC0/UWIfsU9eycI/AAAAAAAAAEA/-dNnFHLP1WI/s1600/inyorite.png);
}
#blog-pager-newer-link, #blog-pager-older-link {
&#160;&#160;&#160;&#160;background: -moz-linear-gradient(center top , #657E95 0%, #586D84 40%, #586D84 60%, #657E95 100%) repeat scroll 0 0 transparent;
&#160;&#160;&#160;&#160;background: -webkit-gradient(linear, center top, center bottom, color-stop(0%, #657E95), color-stop(40%, #586D84), color-stop(60%, #586D84), color-stop(100%, #657E95)) repeat scroll 0 0 transparent;
&#160;&#160;&#160;&#160;background-color:#586D84;
&#160;&#160;&#160;&#160;border-radius: 3px 3px 3px 3px;
&#160;&#160;&#160;&#160;font-size: 90%;
&#160;&#160;&#160;&#160;padding: 5px;
&#160;&#160;&#160;&#160;height: auto;
&#160;&#160;&#160;&#160;width: 35%;
}
#blog-pager-newer-link a, #blog-pager-older-link a {
&#160;&#160;&#160;&#160;color: #FFFFFF;
&#160;&#160;&#160;&#160;display: block;
&#160;&#160;&#160;&#160;height: 30px;
}
#blog-pager-newer-link:hover, #blog-pager-older-link:hover {
&#160;&#160;&#160;&#160;opacity: 0.8;
&#160;&#160;&#160;&#160;filter:alpha(opacity=80);
&#160;&#160;&#160;&#160;-ms-filter: "alpha( opacity=80 )";
}
#blog-pager-newer-link a:hover, #blog-pager-older-link a:hover {
&#160;&#160;&#160;&#160;text-decoration: none;
}
#PopularPosts1 .item-content{ height:79px; overflow:hidden;}
.item-snippet{
font-size:12px;
}
.footer-outer {
position: relative;
z-index: 1;
background-color: rgb(53, 51, 51);
}
div#Attribution1 {display:none;}
.header-inner{
margin-top: -15px;
margin-left: 0px;
}
h3.post-title {border-left: 8px #999 solid;
font-family: "ヒラギノ角ゴ Pro W3", "meiryo","メイリオ", "MS Pゴシック", Sans-serif;
font-size: 18px;
font-weight: bold;
margin: 5px 0;
padding: 5px 0 5px 10px;
background: #333333;
border-top: 1px #aaa dotted;
border-bottom: 1px #aaa dotted;
border-right: 1px #aaa dotted;
box-shadow:1px 2px 30px rgba(0, 0, 0, 0.4) , inset 0 0 10px rgba(0, 0, 0, 0.1) ;
}
h2 {padding:3px;
border-bottom:1px dotted #cccccc;
width:auto;
height:auto;
background: #333333;
padding-left: 0px;
margin: 0px 0px 0px -0px;
font-family: "ヒラギノ角ゴ Pro W3", "meiryo","メイリオ", "MS Pゴシック", Sans-serif;
font: $(widget.date-header.title.font);
text-transform: $(widget.date-header.title.text.transform);
color: $(widget.date-header.title.text.color);
}
h4 {
border-left: 8px #777 solid;
font-size: 18px;
font-weight: bold;
margin: 5px 0;
padding: 5px 0 5px 10px;
background: #333;
border-top: 1px #777 solid;
border-bottom: 1px #777 solid;
border-right: 1px #777 solid;
}
/*&#12288;&#12302;続きを読む&#12303;を右揃え+余白を調整&#12288;*/
div.jump-link {
text-align: right;
}
body {
font-family: "ヒラギノ角ゴ Pro W3", "meiryo","メイリオ", "MS Pゴシック", Sans-serif;
font-size: 14px;
line-height: 1.3;
font-weight: normal;
}
div#HTML12 {
width:938px;
padding: 0px 0px 0px 0px;
}.tabs-inner .widget li a {
font: normal normal "ヒラギノ角ゴ Pro W3", "meiryo","メイリオ", "MS Pゴシック", Sans-serif;
}.main-inner .column-right-outer {
width: 350px;
margin-right: -350px;
}
.column-right-inner{
width: 340px;
margin-right: -340px;
}
.section {
margin: 0 4px;
}
.main-inner  {
padding: 0px 15px 0px 0px;
}
.main-inner .column-right-inner {
padding: 0 0 0 0px;
}
#HTML9{margin-top:-15px; }
#HTML13{margin-bottom:-30px;}
#PopularPosts1{margin-top:-1px; }
#HTML8{margin-bottom:-20px; }

こんなに長いCSSが上記サイトの最適化CSSによると、

以下のようにとてもシンプルで短いものになりました。

body{font:normal normal 12px Arial, Tahoma, Helvetica, FreeSans, sans-serif;color:#cccccc;background:#000000 none repeat scroll top left;padding:0 40px 40px 40px;}
html body .region-inner{min-width:0;max-width:100%;width:auto;}
a:link{text-decoration:none;color:#fff1d2;}
a:visited{text-decoration:none;color:#f0c99e;}
a:hover{text-decoration:underline;color:#0065dd;}
.body-fauxcolumn-outer .fauxcolumn-inner{background:transparent none repeat scroll top left;_background-image:none;}
.body-fauxcolumn-outer .cap-top{position:absolute;z-index:1;height:400px;width:100%;background:#000000 none repeat scroll top left;}
.body-fauxcolumn-outer .cap-top .cap-left{width:100%;background:transparent none repeat-x scroll top left;_background-image:none;}
.content-outer{-moz-box-shadow:0 0 40px rgba(0, 0, 0, .15);-webkit-box-shadow:0 0 5px rgba(0, 0, 0, .15);-goog-ms-box-shadow:0 0 10px #333333;box-shadow:0 0 40px rgba(0, 0, 0, .15);margin-bottom:1px;}
.content-inner{padding:10px 10px;}
.content-inner{background-color:#333333;}
.header-outer{background:transparent none repeat-x scroll 0 -400px;_background-image:none;}
.Header h1{font:normal normal 60px Arial, Tahoma, Helvetica, FreeSans, sans-serif;color:#ffffff;text-shadow:-1px -1px 1px rgba(0, 0, 0, .2);}
.Header h1 a{color:#ffffff;}
.Header .description{font-size:140%;color:#dfb97a;}
.header-inner .Header .titlewrapper{padding:22px 30px;}
.header-inner .Header .descriptionwrapper{padding:0 30px;}
.tabs-inner .section:first-child{border-top:1px solid #404040;}
.tabs-inner .section:first-child ul{margin-top:-1px;border-top:1px solid #404040;border-left:0 solid #404040;border-right:0 solid #404040;}
.tabs-inner .widget ul{background:#222222 none repeat-x scroll 0 -800px;_background-image:none;border-bottom:1px solid #404040;margin-top:0;margin-left:-30px;margin-right:-30px;}
.tabs-inner .widget li a{display:inline-block;padding:.6em 1em;font:normal normal 14px Arial, Tahoma, Helvetica, FreeSans, sans-serif;color:#ffffff;border-left:1px solid #333333;border-right:0 solid #404040;}
.tabs-inner .widget li:first-child a{border-left:none;}
.tabs-inner .widget li.selected a, .tabs-inner .widget li a:hover{color:#ffffff;background-color:#000000;text-decoration:none;}
.main-outer{border-top:0 solid #404040;}
.fauxcolumn-left-outer .fauxcolumn-inner{border-right:1px solid #404040;}
.fauxcolumn-right-outer .fauxcolumn-inner{border-left:1px solid #404040;}
h2{margin:0 0 1em 0;font:normal bold 16px Arial, Tahoma, Helvetica, FreeSans, sans-serif;color:#ffffff;}
.widget .zippy{color:#999999;text-shadow:2px 2px 1px rgba(0, 0, 0, .1);}
.widget .popular-posts ul{list-style:none;}
.date-header span{background-color:transparent;color:#cccccc;padding:inherit;letter-spacing:inherit;margin:inherit;}
.main-inner{padding-top:30px;padding-bottom:30px;}
.main-inner .column-center-inner{padding:0 15px;}
.main-inner .column-center-inner .section{margin:0 15px;}
.post{margin:0 0 25px 0;}
h3.post-title, .comments h4{font:normal normal 22px Arial, Tahoma, Helvetica, FreeSans, sans-serif;margin:.75em 0 0;}
.post-body{font-size:110%;line-height:1.4;position:relative;}
.post-body img, .post-body .tr-caption-container, .Profile img, .Image img,
.BlogList .item-thumbnail img{padding:0;background:#111111;border:1px solid #111111;-moz-box-shadow:1px 1px 5px rgba(0, 0, 0, .1);-webkit-box-shadow:1px 1px 5px rgba(0, 0, 0, .1);box-shadow:1px 1px 5px rgba(0, 0, 0, .1);}
.post-body img, .post-body .tr-caption-container{padding:1px;}
.post-body .tr-caption-container{color:#cccccc;}
.post-body .tr-caption-container img{padding:0;background:transparent;border:none;-moz-box-shadow:0 0 0 rgba(0, 0, 0, .1);-webkit-box-shadow:0 0 0 rgba(0, 0, 0, .1);box-shadow:0 0 0 rgba(0, 0, 0, .1);}
.post-header{margin:0 0 1.5em;line-height:1.6;font-size:90%;}
.post-footer{margin:20px -2px 0;padding:5px 10px;color:#888888;background-color:#303030;border-bottom:1px solid #444444;line-height:1.6;font-size:90%;}
#comments .comment-author{padding-top:1.5em;border-top:1px solid #404040;background-position:0 1.5em;}
#comments .comment-author:first-child{padding-top:0;border-top:none;}
.avatar-image-container{margin:.2em 0 0;}
#comments .avatar-image-container img{border:1px solid #111111;}
.comments .comments-content .icon.blog-author{background-repeat:no-repeat;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9sLFwMeCjjhcOMAAAD+SURBVDjLtZSvTgNBEIe/WRRnm3U8RC1neQdsm1zSBIU9VVF1FkUguQQsD9ITmD7ECZIJSE4OZo9stoVjC/zc7ky+zH9hXwVwDpTAWWLrgS3QAe8AZgaAJI5zYAmc8r0G4AHYHQKVwII8PZrZFsBFkeRCABYiMh9BRUhnSkPTNCtVXYXURi1FpBDgArj8QU1eVXUzfnjv7yP7kwu1mYrkWlU33vs1QNu2qU8pwN0UpKoqokjWwCztrMuBhEhmh8bD5UDqur75asbcX0BGUB9/HAMB+r32hznJgXy2v0sGLBcyAJ1EK3LFcbo1s91JeLwAbwGYu7TP/3ZGfnXYPgAVNngtqatUNgAAAABJRU5ErkJggg==);}
.comments .comments-content .loadmore a{border-top:1px solid #999999;border-bottom:1px solid #999999;}
.comments .comment-thread.inline-thread{background-color:#303030;}
.comments .continue{border-top:2px solid #999999;}
.section-columns td.columns-cell{border-left:1px solid #404040;}
.blog-pager{background:transparent none no-repeat scroll top center;}
.blog-pager-older-link, .home-link,
.blog-pager-newer-link{background-color:#333333;padding:5px;}
.footer-outer{border-top:0 dashed #bbbbbb;}
body.mobile{background-size:auto;}
.mobile .body-fauxcolumn-outer{background:transparent none repeat scroll top left;}
.mobile .body-fauxcolumn-outer .cap-top{background-size:100% auto;}
.mobile .content-outer{-webkit-box-shadow:0 0 3px rgba(0, 0, 0, .15);box-shadow:0 0 3px rgba(0, 0, 0, .15);}
body.mobile .AdSense{margin:0 -40px;}
.mobile .tabs-inner .widget ul{margin-left:0;margin-right:0;}
.mobile .post{margin:0;}
.mobile .main-inner .column-center-inner .section{margin:0;}
.mobile .date-header span{padding:0.1em 10px;margin:0 -10px;}
.mobile h3.post-title{margin:0;}
.mobile .blog-pager{background:transparent none no-repeat scroll top center;}
.mobile .footer-outer{border-top:none;}
.mobile .main-inner, .mobile .footer-inner{background-color:#333333;}
.mobile-index-contents{color:#cccccc;}
.mobile-link-button{background-color:#fff1d2;}
.mobile-link-button a:link, .mobile-link-button a:visited{color:#ffffff;}
.mobile .tabs-inner .section:first-child{border-top:none;}
.mobile .tabs-inner .PageList .widget-content{background-color:#000000;color:#ffffff;border-top:1px solid #404040;border-bottom:1px solid #404040;}
.mobile .tabs-inner .PageList .widget-content .pagelist-arrow{border-left:1px solid #404040;}
.Header h1 a:hover{color:#9fc5e8;//Sample}
#back-top{position:fixed;bottom:5px;right:20px;margin-left:85%;}
#back-top a{width:108px;display:block;text-align:center;font:11px/100% Arial, Helvetica, sans-serif;text-transform:uppercase;text-decoration:none;color:#bbb;-webkit-transition:1s;-moz-transition:1s;transition:1s;}
#back-top a:hover{color:#000;}
#back-top span{width:50px;height:50px;display:block;margin-bottom:0px;background:#eae5e3 url(http://3.bp.blogspot.com/-6uLA1SuNifo/UWCeck_iF2I/AAAAAAAAAB4/pQmLFSwqdOE/s1600/go_top.png) no-repeat center center;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;-webkit-transition:1s;-moz-transition:1s;transition:1s;}
#back-top a:hover span{opacity:0.5;filter:alpha(opacity=50)
background-color:#eee;}
#fixed-box{position:fixed;top:10px;z-index:0;}
.footer-outer{position:relative;z-index:1;background-color:#FCFCFC;}
blockquote{position:relative;padding:20px 50px;min-height:20px;background:url(http://3.bp.blogspot.com/-px-RVucfs90/UWIfqe2zGMI/AAAAAAAAAD4/bkYfg_92M48/s1600/inyoleft.png) no-repeat 10px 10px #444444;}
blockquote:after{position:absolute;bottom:10px;right:10px;content:url(http://1.bp.blogspot.com/-fVn1Z8gHTC0/UWIfsU9eycI/AAAAAAAAAEA/-dNnFHLP1WI/s1600/inyorite.png);}
#blog-pager-newer-link, #blog-pager-older-link{&#160;&#160;&#160;&#160;background:-moz-linear-gradient(center top , #657E95 0%, #586D84 40%, #586D84 60%, #657E95 100%) repeat scroll 0 0 transparent;&#160;&#160;&#160;&#160;background:-webkit-gradient(linear, center top, center bottom, color-stop(0%, #657E95), color-stop(40%, #586D84), color-stop(60%, #586D84), color-stop(100%, #657E95)) repeat scroll 0 0 transparent;&#160;&#160;&#160;&#160;background-color:#586D84;&#160;&#160;&#160;&#160;border-radius:3px 3px 3px 3px;&#160;&#160;&#160;&#160;font-size:90%;&#160;&#160;&#160;&#160;padding:5px;&#160;&#160;&#160;&#160;height:auto;&#160;&#160;&#160;&#160;width:35%;}
#blog-pager-newer-link a, #blog-pager-older-link a{&#160;&#160;&#160;&#160;color:#FFFFFF;&#160;&#160;&#160;&#160;display:block;&#160;&#160;&#160;&#160;height:30px;}
#blog-pager-newer-link:hover, #blog-pager-older-link:hover{&#160;&#160;&#160;&#160;opacity:0.8;&#160;&#160;&#160;&#160;filter:alpha(opacity=80);&#160;&#160;&#160;&#160;-ms-filter:"alpha( opacity=80 )";}
#blog-pager-newer-link a:hover, #blog-pager-older-link a:hover{&#160;&#160;&#160;&#160;text-decoration:none;}
#PopularPosts1 .item-content{height:79px;overflow:hidden;}
.item-snippet{font-size:12px}
.footer-outer{position:relative;z-index:1;background-color:rgb(53, 51, 51);}
div#Attribution1{display:none;}
.header-inner{margin-top:-15px;margin-left:0px;}
h3.post-title{border-left:8px #999 solid;font-family: "ヒラギノ角ゴ Pro W3", "meiryo","メイリオ", "MS Pゴシック", Sans-serif;font-size:18px;font-weight:bold;margin:5px 0;padding:5px 0 5px 10px;background:#333333;border-top:1px #aaa dotted;border-bottom:1px #aaa dotted;border-right:1px #aaa dotted;box-shadow:1px 2px 30px rgba(0, 0, 0, 0.4) , inset 0 0 10px rgba(0, 0, 0, 0.1);}
h2{padding:3px;border-bottom:1px dotted #cccccc;width:auto;height:auto;background:#333333;padding-left:0px;margin:0px 0px 0px -0px;font-family: "ヒラギノ角ゴ Pro W3", "meiryo","メイリオ", "MS Pゴシック", Sans-serif;font:$(widget.date-header.title.font);text-transform:$(widget.date-header.title.text.transform);color:$(widget.date-header.title.text.color);}
h4{border-left:8px #777 solid;font-size:18px;font-weight:bold;margin:5px 0;padding:5px 0 5px 10px;background:#333;border-top:1px #777 solid;border-bottom:1px #777 solid;border-right:1px #777 solid;}
div.jump-link{text-align:right;}
body{font-family: "ヒラギノ角ゴ Pro W3", "meiryo","メイリオ", "MS Pゴシック", Sans-serif;font-size:14px;line-height:1.3;font-weight:normal;}
div#HTML12{width:938px;padding:0px 0px 0px 0px;}.tabs-inner .widget li a{font:normal normal "ヒラギノ角ゴ Pro W3", "meiryo","メイリオ", "MS Pゴシック", Sans-serif;}.main-inner .column-right-outer{width:350px;margin-right:-350px;}
.column-right-inner{width:340px;margin-right:-340px;}
.section{margin:0 4px;}
.main-inner{padding:0px 15px 0px 0px;}
.main-inner .column-right-inner{padding:0 0 0 0px;}
#HTML9{margin-top:-15px;}
#HTML13{margin-bottom:-30px;}
#PopularPosts1{margin-top:-1px;}
#HTML8{margin-bottom:-20px;}

<b:template-skin>…</b:template-skin>内のCSSもとても簡素化簡略化されました。

元の<b:template-skin>…</b:template-skin>内のCSS

body {
min-width: 960px;
}
.content-outer, .content-fauxcolumn-outer, .region-inner {
min-width: 960px;
max-width: 960px;
_width: 960px;
}
.main-inner .columns {
padding-left: 0;
padding-right: 310px;
}
.main-inner .fauxcolumn-center-outer {
left: 0;
right: 310px;
/* IE6 does not respect left and right together */
_width: expression(this.parentNode.offsetWidth -
parseInt("0") -
parseInt("310px") + 'px');
}
.main-inner .fauxcolumn-left-outer {
width: 0;
}
.main-inner .fauxcolumn-right-outer {
width: 310px;
}
.main-inner .column-left-outer {
width: 0;
right: 100%;
margin-left: -0;
}
.main-inner .column-right-outer {
width: 310px;
margin-right: -310px;
}
#layout {
min-width: 0;
}
#layout .content-outer {
min-width: 0;
width: 800px;
}
#layout .region-inner {
min-width: 0;
width: auto;
}

これが以下のようにとてもシンプルになりました。

body{min-width:960px;}
.content-outer, .content-fauxcolumn-outer, .region-inner{min-width:960px;max-width:960px;_width:960px;}
.main-inner .columns{padding-left:0;padding-right:310px;}
.main-inner .fauxcolumn-center-outer{left:0;right:310px;_width:expression(this.parentNode.offsetWidth -
parseInt("0") -
parseInt("310px") + 'px');}
.main-inner .fauxcolumn-left-outer{width:0;}
.main-inner .fauxcolumn-right-outer{width:310px;}
.main-inner .column-left-outer{width:0;right:100%;margin-left:-0;}
.main-inner .column-right-outer{width:310px;margin-right:-310px;}
#layout{min-width:0;}
#layout .content-outer{min-width:0;width:800px;}
#layout .region-inner{min-width:0;width:auto;}

<b:skin>…</b:skin>内のCSSだけでの削減率は、

元々のCSSのファイルサイズが21.8KBだったものに対して、
最適化されたCSSに於いては、わずか10.7KBとなり、
51.4%も削減できました。


<b:template-skin>…</b:template-skin>のCSSに於いては、

元々のCSSのファイルサイズは838バイトだったのが、
最適化されたCSSに於いては、わずか690バイトとなり、
21.4%も削減できました。

CSSファイルのみで、
トータル72.8%の削減・最適化ができました。

今後CSSをカスタマイズしなければならない時やCSSをカスタマイズしたい時には、

元のCSSにてカスタマイズをして、
再度上記サイト表示速度測定サイトにて分析して、
最適化をしたCSSにしたいと思います。

今回はCSSコードばかりの投稿になってしまい申し訳ありません。

サイト表示速度への影響は…。

You may choose to prevent this website from aggregating and analyzing the actions you take here. Doing so will protect your privacy, but will also prevent the owner from learning from your actions and creating a better experience for you and other users.

コメント

スポンサーリンク
タイトルとURLをコピーしました