vimperatorネタです。vimperatorってなによ?というお話は、先日書いた vimperatorが素敵! – Firefox Add-on にて・・・・。
で、その中で、vimperatorのCSS設定方法で、commandlieの色が変わらん!と嘆いていた。
そしたら、”通りすがり”さんがアドバイスしてくれたので、そのCSS設定メモ。
※ vimperator1.2preでの色設定です!
結論からいうと・・・下のように見事に色変更できた!
デフォルトの色

↓
CSS適用後の色

vimperator CSS設定
CSSの設定を貼り付けておきます。CSSは、profiles配下のuserChrome.cssにて指定します。
H:\mydata\FireFox\Profiles\chrome\userChrome.css
/* bufferwindow style */
#liberator-container{
color: blue !important; // 指定しないとbufferwindowでcolorが利かない
}
#liberator-bufferwindow, #liberator-completion, #liberator-previewwindow {
color: blue !important;
background-color: #eee !important;
}
/* commandline style */
#liberator-commandline{
/*font-family:"Luxi Mono", monospace !important; // <-- フォントを指定するなら */
background-color: #222 !important;
color: #fff !important;
font-weight: normal !important;
font-size: 10pt !important;
}
/* statusline style */
#liberator-statusline {
/*font-family:"Luxi Mono", monospace !important; // <-- フォントを指定するなら */
font-weight: normal !important;
font-size: 10pt !important;
padding:3px 0 !important;
}
/* normal page statusline */
.hl-StatusLine {
background-color: #000 !important;
color: #B0FF00 !important;
}
/* secure(ssl) page statusline */
.hl-StatusLineSecure {
background-color: #B0FF00 !important; /* light green */
color: black !important;
}
※ #liberator-statuslineのfont-sizeを16px以上にする場合は、注意が必要のようです。
詳しくは→→“通りすがり”さんのコメント
[参考]ついでに・・・vimperator.cssを覗いてみる
そう、そもそもvimperator.jarの中身。vimperator.cssを覗いてみればよかったじゃないの。
ということで、そのデフォルトCSSも貼り付けておきます。これでIDとClassがわかりますね。
/***** BEGIN LICENSE BLOCK ***** {{{
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
(c) 2006-2008: Martin Stubenschrott <stubenschrott@gmx.net>
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
}}} ***** END LICENSE BLOCK *****/
#liberator-container {
font-family: monospace;
}
#liberator-bufferwindow, #liberator-completion, #liberator-previewwindow {
-moz-user-focus: ignore;
overflow: -moz-scrollbars-none !important; /* does not seem to work fully */
border-width: 0px !important;
-moz-appearance: none !important; /* prevent an ugly 3D border */
}
/* the selected item in listboxes is hardly readable without this */
#liberator-completion > listitem[selected="true"] > listcell,
#liberator-bufferwindow > listitem[selected="true"] > listcell,
#liberator-previewwindow > listitem[selected="true"] > listcell {
background-color: Highlight !important;
color: HighlightText !important;
}
/* fixes the min-height: 22px from firefox */
#status-bar, statusbarpanel {
-moz-appearance: none !important;
min-height: 18px !important;
border: none !important;
font-weight: bold;
font-family: monospace;
}
#liberator-statusline {
font-family: monospace;
margin: 0px;
}
#liberator-statusline > label {
padding: 0px 0px 0px 8px;
}
#liberator-statusline > label:first-child {
padding: 0px;
}
#liberator-statusline-field-url {
background-color: inherit;
color: inherit;
}
/* no longer at the window's bottom right corner */
.statusbar-resizerpanel {
display: none;
}
#statusbar-display, #statusbar-progresspanel {
display: none;
}
#liberator-commandline {
padding: 1px;
/*
background-color: white;
color: black;
*/
}
#liberator-commandline-prompt, #liberator-commandline-command {
background-color: inherit;
color: inherit;
}
#liberator-visualbell {
border: none;
background-color: black;
}
#sidebar {
max-width: 90% !important;
min-width: 10% !important;
}
/* highlight groups */
.hl-Normal {
background-color: white;
color: black;
}
.hl-ErrorMsg {
background-color: red;
color: white;
font-weight: bold;
}
.hl-ModeMsg {
background-color: white;
color: black;
}
.hl-MoreMsg {
background-color: white;
color: green;
}
.hl-Question {
background-color: white;
color: green;
}
.hl-Title {
background-color: white;
color: magenta;
font-weight: bold;
}
.hl-Warning {
background-color: white;
color: red;
}
.hl-StatusLine {
background: none !important;
background-color: black !important;
color: white !important;
}
.hl-StatusLineSecure {
background: none !important;
background-color: #B0FF00 !important; /* light green */
color: black !important;
}
.hl-StatusLineBroken {
background: none !important;
background-color: #FF6060 !important; /* light red */
color: black !important;
}
.hl-URL {
background-color: white;
color: green;
text-decoration: none;
}
/* NOTE: .aClass:hover not supported in quirks mode: http://developer.mozilla.org/en/docs/Mozilla_Quirks_Mode_Behavior */
a.hl-URL:hover {
text-decoration: underline;
cursor: pointer;
}
/* MOW */
#liberator-multiline-output {
overflow: hidden;
background-color: white;
color: black;
}
#liberator-multiline-output-content {
white-space: pre; /* -moz-pre-wrap FIXME: Should lines wrap like Vim? */
font-family: -moz-fixed;
margin: 0px;
}
#liberator-multiline-output-content * {
font: inherit;
}
#liberator-multiline-output-content table {
white-space: inherit;
border-spacing: 0px;
}
#liberator-multiline-output-content td,
#liberator-multiline-output-content th {
padding: 0px 2px;
}
/* vim: set fdm=marker sw=4 ts=4 et: */
その他・・・
vimperator0.6系?は下記でもいけるのかもしれない
まとめ
特にまとめることはなし。次回こそ、”plugin導入”と”使い方”の記事を書くつもり。
関連記事(こちらもどうぞ)