wiki:hackingfirefox
Wiki: Hacking Firefox
2005/8/24
%profile_dir%/chrome
userChrome.css
把左侧边栏移动到右边
/*
* move favor bar to right
*/
#main-window > hbox { direction:rtl;}
#main-window > hbox > * { direction:ltr;}
修改UI
firefox 的UI 默认字体是simsun,但是我们可以通过修改 %profile_dir%/chrome/userChrome.css 来修改它们,甚至可以做出一个新的theme来。
在 userChrome.css 中添加:
/*
* Setup font size
*/
*{font-size: 9pt !important}
*{font-family: Tahoma !important}
可以把UI字体修改为Tahoma。
userContent.css
改变鼠标形状
有些链接的target是 _self,有些是 _blank,如何一眼区分呢?如下方法是使得鼠标在 _blank 的链接上成为十字形状
:link[target="_blank"],
:visited[target="_blank"],
:link[target="_new"],
:visited[target="_new"] { cursor: crosshair; }
设置活动tab的颜色
/* Change color of active tab */tab{
-moz-appearance: none !important;
}
tab[selected="true"] {
background-color: rgb(222,218,210) !important;
color: black !important;
}
/* Change color of normal tabs */tab:not([selected="true"]) {
background-color: rgb(200,196,188) !important;
color: gray !important;
}
更改页面文字大小
一般我们是在preference里边设置字体的最小值,但是有时候会不管用,更加稳定的方法是 修改 %profile_dir%/chrome/userContent.css,比如我们可以做如下修改:
html>body {
font-size: 110% !important;
line-height: normal !important;
}
这样,每个打开的web页面,字体都放大到原来的1.1倍
References