賢威(けんい)のCSS基本スタイル一覧|フォント・余白・装飾クラスまとめ

※当サイトにはプロモーションが含まれています。

このブログは、ワードプレス(WordPress)テーマの賢威(けんい)を使用して作成しています。

その賢威(けんい)ですが、2025年1月31日(金)をもって販売が終了し、同年12月26日正午をもってサポートも終了しました。

公式サイトの発表によると、今後マニュアルページも閉鎖される可能性があるとのことです。

そのため、自分がよく使っているCSSについて、備忘録を兼ねて一覧としてまとめてみました。

賢威8の基本スタイル、CSSのクラス一覧

賢威の基本スタイル、CSSのクラス一覧になります。

なお、これら記載したCSSは予め、賢威で用意されているものです。

その為、適用したいクラスがあれば、

<p class="al-c f12em">文字が中寄せで少し大きくなる</p>

のように書くことで、クラスが適用されます。

にゃのらいとにゃのらいと

実際に記述するとこのように表示されるにゃ。

文字が中寄せで少し大きくなる

※「追加CSS」などに記述する必要はありません

フォントサイズ関するCSS

賢威のCSSでは、フォントサイズの指定に複数の単位が使われています。

  • em指定・・・賢威のメインのフォントサイズは16pxなので、「1.2em」を指定すると1.2倍となり19.2pxになります
  • rem指定・・・賢威では、html要素のフォントサイズを「10px」に指定しているので、16pxに指定したい場合は「1.6rem」を指定します
/* em指定 */
.f08em{ font-size: 0.8em!important; }
.f09em{ font-size: 0.9em!important; }
.f10em{ font-size: 1.0em!important; }
.f11em{ font-size: 1.1em!important; }
.f12em{ font-size: 1.2em!important; }
.f13em{ font-size: 1.3em!important; }
.f14em{ font-size: 1.4em!important; }
.f15em{ font-size: 1.5em!important; }
.f16em{ font-size: 1.6em!important; }
.f17em{ font-size: 1.7em!important; }
.f18em{ font-size: 1.8em!important; }
.f19em{ font-size: 1.9em!important; }
.f20em{ font-size: 2.0em!important; }
.f21em{ font-size: 2.1em!important; }
.f22em{ font-size: 2.2em!important; }
.f23em{ font-size: 2.3em!important; }
.f24em{ font-size: 2.4em!important; }
.f25em{ font-size: 2.5em!important; }
.f26em{ font-size: 2.6em!important; }
.f27em{ font-size: 2.7em!important; }
.f28em{ font-size: 2.8em!important; }
.f29em{ font-size: 2.9em!important; }
.f30em{ font-size: 3.0em!important; }

/* rem指定 */
.f08rem{ font-size: 0.8rem!important; }
.f09rem{ font-size: 0.9rem!important; }
.f10rem{ font-size: 1.0rem!important; }
.f11rem{ font-size: 1.1rem!important; }
.f12rem{ font-size: 1.2rem!important; }
.f13rem{ font-size: 1.3rem!important; }
.f14rem{ font-size: 1.4rem!important; }
.f15rem{ font-size: 1.5rem!important; }
.f16rem{ font-size: 1.6rem!important; }
.f17rem{ font-size: 1.7rem!important; }
.f18rem{ font-size: 1.8rem!important; }
.f19rem{ font-size: 1.9rem!important; }
.f20rem{ font-size: 2.0rem!important; }
.f21rem{ font-size: 2.1rem!important; }
.f22rem{ font-size: 2.2rem!important; }
.f23rem{ font-size: 2.3rem!important; }
.f24rem{ font-size: 2.4rem!important; }
.f25rem{ font-size: 2.5rem!important; }
.f26rem{ font-size: 2.6rem!important; }
.f27rem{ font-size: 2.7rem!important; }
.f28rem{ font-size: 2.8rem!important; }
.f29rem{ font-size: 2.9rem!important; }
.f30rem{ font-size: 3.0rem!important; }

/* px指定 */
.f10px{ font-size: 10px!important; }
.f11px{ font-size: 11px!important; }
.f12px{ font-size: 12px!important; }
.f13px{ font-size: 13px!important; }
.f14px{ font-size: 14px!important; }
.f15px{ font-size: 15px!important; }
.f16px{ font-size: 16px!important; }
.f17px{ font-size: 17px!important; }
.f18px{ font-size: 18px!important; }
.f19px{ font-size: 19px!important; }
.f20px{ font-size: 20px!important; }
.f21px{ font-size: 21px!important; }
.f22px{ font-size: 22px!important; }
.f23px{ font-size: 23px!important; }
.f24px{ font-size: 24px!important; }

マージンとパディングに関するCSS

マージン(外側余白)とパディング(内側余白)に関するCSSです。

なお、記載しているのは、マージン(外側余白)のみですが、mpに変更すれば、パディング(内側余白)の調整になります。

ただし、パディング(内側余白)の場合は、100(px)までとなります。

.m0{ margin: 0!important; }
.m0-t{ margin-top: 0!important; }
.m0-r{ margin-right: 0!important; }
.m0-b{ margin-bottom: 0!important; }
.m0-l{ margin-left: 0!important; }

.m5{ margin: 5px!important; }
.m5-t{ margin-top: 5px!important; }
.m5-r{ margin-right: 5px!important; }
.m5-b{ margin-bottom: 5px!important; }
.m5-l{ margin-left: 5px!important; }

.m10{ margin: 10px!important; }
.m10-t{ margin-top: 10px!important; }
.m10-r{ margin-right: 10px!important; }
.m10-b{ margin-bottom: 10px!important; }
.m10-l{ margin-left: 10px!important; }

.m15{ margin: 15px!important; }
.m15-t{ margin-top: 15px!important; }
.m15-r{ margin-right: 15px!important; }
.m15-b{ margin-bottom: 15px!important; }
.m15-l{ margin-left: 15px!important; }

.m20{ margin: 20px!important; }
.m20-t{ margin-top: 20px!important; }
.m20-r{ margin-right: 20px!important; }
.m20-b{ margin-bottom: 20px!important; }
.m20-l{ margin-left: 20px!important; }

.m25{ margin: 25px!important; }
.m25-t{ margin-top: 25px!important; }
.m25-r{ margin-right: 25px!important; }
.m25-b{ margin-bottom: 25px!important; }
.m25-l{ margin-left: 25px!important; }

.m30{ margin: 30px!important; }
.m30-t{ margin-top: 30px!important; }
.m30-r{ margin-right: 30px!important; }
.m30-b{ margin-bottom: 30px!important; }
.m30-l{ margin-left: 30px!important; }

.m40{ margin: 40px!important; }
.m40-t{ margin-top: 40px!important; }
.m40-r{ margin-right: 40px!important; }
.m40-b{ margin-bottom: 40px!important; }
.m40-l{ margin-left: 40px!important; }

.m50{ margin: 50px!important; }
.m50-t{ margin-top: 50px!important; }
.m50-r{ margin-right: 50px!important; }
.m50-b{ margin-bottom: 50px!important; }
.m50-l{ margin-left: 50px!important; }

.m60{ margin: 60px!important; }
.m60-t{ margin-top: 60px!important; }
.m60-r{ margin-right: 60px!important; }
.m60-b{ margin-bottom: 60px!important; }
.m60-l{ margin-left: 60px!important; }

.m70{ margin: 70px!important; }
.m70-t{ margin-top: 70px!important; }
.m70-r{ margin-right: 70px!important; }
.m70-b{ margin-bottom: 70px!important; }
.m70-l{ margin-left: 70px!important; }

.m80{ margin: 80px!important; }
.m80-t{ margin-top: 80px!important; }
.m80-r{ margin-right: 80px!important; }
.m80-b{ margin-bottom: 80px!important; }
.m80-l{ margin-left: 80px!important; }

.m90{ margin: 90px!important; }
.m90-t{ margin-top: 90px!important; }
.m90-r{ margin-right: 90px!important; }
.m90-b{ margin-bottom: 90px!important; }
.m90-l{ margin-left: 90px!important; }

.m100{ margin: 100px!important; }
.m100-t{ margin-top: 100px!important; }
.m100-r{ margin-right: 100px!important; }
.m100-b{ margin-bottom: 100px!important; }
.m100-l{ margin-left: 100px!important; }

.m120{ margin: 120px!important; }
.m120-t{ margin-top: 120px!important; }
.m120-r{ margin-right: 120px!important; }
.m120-b{ margin-bottom: 120px!important; }
.m120-l{ margin-left: 120px!important; }

.m150{ margin: 150px!important; }
.m150-t{ margin-top: 150px!important; }
.m150-r{ margin-right: 150px!important; }
.m150-b{ margin-bottom: 150px!important; }
.m150-l{ margin-left: 150px!important; }

.m200{ margin: 200px!important; }
.m200-t{ margin-top: 200px!important; }
.m200-r{ margin-right: 200px!important; }
.m200-b{ margin-bottom: 200px!important; }
.m200-l{ margin-left: 200px!important; }

.m300{ margin: 300px!important; }
.m300-t{ margin-top: 300px!important; }
.m300-r{ margin-right: 300px!important; }
.m300-b{ margin-bottom: 300px!important; }
.m300-l{ margin-left: 300px!important; }
にゃのらいとにゃのらいと

さらに、モバイルとパソコンで異なる余白調整をするクラスもあるにゃ。

.m10-20-t{ margin-top: 10px; }/*モバイルのときは10pxでPCのときは20px*/
.m15-30-t{ margin-top: 15px; }
.m20-40-t{ margin-top: 20px; }
.m25-50-t{ margin-top: 25px; }
.m30-60-t{ margin-top: 30px; }
.m35-70-t{ margin-top: 35px; }
.m40-80-t{ margin-top: 40px; }
.m45-90-t{ margin-top: 45px; }

.m10-20-b{ margin-bottom: 10px; }
.m15-30-b{ margin-bottom: 15px; }
.m20-40-b{ margin-bottom: 20px; }
.m25-50-b{ margin-bottom: 25px; }
.m30-60-b{ margin-bottom: 30px; }
.m35-70-b{ margin-bottom: 35px; }
.m40-80-b{ margin-bottom: 40px; }
.m45-90-b{ margin-bottom: 45px; }
@media (min-width : 768px){
.m10-20-t{ margin-top: 20px!important; }
.m15-30-t{ margin-top: 30px!important; }
.m20-40-t{ margin-top: 40px!important; }
.m25-50-t{ margin-top: 50px!important; }
.m30-60-t{ margin-top: 60px!important; }
.m35-70-t{ margin-top: 70px!important; }
.m40-80-t{ margin-top: 80px!important; }
.m45-90-t{ margin-top: 90px!important; }

.m10-20-b{ margin-bottom: 20px!important; }
.m15-30-b{ margin-bottom: 30px!important; }
.m20-40-b{ margin-bottom: 40px!important; }
.m25-50-b{ margin-bottom: 50px!important; }
.m30-60-b{ margin-bottom: 60px!important; }
.m35-70-b{ margin-bottom: 70px!important; }
.m40-80-b{ margin-bottom: 80px!important; }
.m45-90-b{ margin-bottom: 90px!important; }
}

テキスト配置・行間に関するCSS

文字の位置調整(左・真ん中・右)や、行と行との間の調整などで使用します。

/*文字の横位置*/
.al-l{ text-align: left!important; }
.al-r{ text-align: right!important; }
.al-c{ text-align: center!important; }

/*文字の縦位置*/
.vl-t{ vertical-align: top!important; }/*上寄せ*/
.vl-m{ vertical-align: middle!important; }/*中央寄せ*/
.vl-b{ vertical-align: bottom!important; }/*下寄せ*/
にゃテックにゃテック

行間の設定は、ウィジェット(特にサイドバー)で使用することが多いです。

.lh10{ line-height: 1.0!important; }
.lh11{ line-height: 1.1!important; }
.lh12{ line-height: 1.2!important; }
.lh13{ line-height: 1.3!important; }
.lh14{ line-height: 1.4!important; }
.lh15{ line-height: 1.5!important; }
.lh16{ line-height: 1.6!important; }
.lh17{ line-height: 1.7!important; }
.lh18{ line-height: 1.8!important; }
.lh19{ line-height: 1.9!important; }
.lh20{ line-height: 2.0!important; }

フォントの色や装飾に関するCSS

フォントの色や装飾に関するCSSです。

/*フォントの装飾*/
.b{ font-weight: bold!important; }
.normal{ font-weight: normal!important; }

/*フォントの色設定*/
.red{ color: #e00000!important; }
.blue{ color: #0329ce!important; }
.green{ color: #01995e!important; }
.yellow{ color: #ffe400!important; }
.navy{ color: #133d94!important; }/*紺*/
.orange{ color: #eca100!important; }
.pink{ color: #eb67b5!important; }
.purple{ color: #9940d2!important; }
.olive{ color: #9bb814!important; }
.lime{ color: #2abe0d!important; }
.aqua{ color: #0baedd!important; }/*水色*/
.black{ color: #000!important; }
.gray{ color: #999!important; }
.white{ color: #fff!important; }
.brown{ color: #4b1c1c!important; }

表示制御に関するCSS

知っておくと便利な表示を制御するクラスです。

/*デスクトップとモバイルで表示を振り分け*/
.show-sp{
display: block!important;
}

.show-sp02{
display: inline!important;
}

.show-pc,
.show-pc02{
display: none!important;
}


以上、賢威で自分が使用することがあるCSSの一覧でした。

にゃテックにゃテック

なお、賢威がいつまで利用できるかについてですが、2026年には“WordPress 7.0”がリリースされると考えられるため、その前後から互換性の問題が出てくる可能性が高いと見ています。

そのため、当面はWordPress 6.7前後のバージョンで運用を続け、そこに対応できなくなった時点が一区切りになるのかもしれません──。