Firefox 主题从 1.5.0.x 到 2.0 的变化
browser/browser.css 中
下列代码被移除:
代码 /* mail button */
#mail-button { -moz-image-region: rect(0px 360px 24px 336px); } #mail-button:hover { -moz-image-region: rect(24px 360px 48px 336px); } #mail-button[disabled="true"] { -moz-image-region: rect(48px 360px 72px 336px);
代码 /* mail button */
toolbar[iconsize="small"] #mail-button { -moz-image-region: rect(0px 240px 16px 224px); } toolbar[iconsize="small"] #mail-button:hover { -moz-image-region: rect(16px 240px 32px 224px); } toolbar[iconsize="small"] #mail-button[disabled="true"] { -moz-image-region: rect(32px 240px 48px 224px); }
下列代码发生了改变:
1.5.0.x 中
代码 /* ::::: go button ::::: */
#go-button { list-style-image: url("chrome://browser/skin/Go.png"); -moz-image-region: rect(0px 20px 20px 0px); padding-top: 2px; padding-bottom: 2px; -moz-padding-start: 3px; -moz-padding-end: 5px; }
2.0 中变为:
代码 /* ::::: go button ::::: */
#go-container { -moz-box-orient: vertical; /* for go button flex hack */ }
#go-button { -moz-box-flex: 1; /* expand to fill toolbar height */ list-style-image: url("chrome://browser/skin/Go.png"); -moz-image-region: rect(0px 20px 20px 0px); padding-top: 2px; padding-bottom: 2px; -moz-padding-start: 3px; -moz-padding-end: 5px; }
1.5.0.x 中
代码 #go-button[disabled="true"] { -moz-image-region: rect(0px 60px 20px 40px); }
#go-button > .toolbarbutton-text { display: -moz-box !important; }
2.0 中变为
代码 #go-button[disabled="true"] { -moz-image-region: rect(0px 60px 20px 40px); }
#go-button > .toolbarbutton-icon { margin: 0; }
#go-button > .toolbarbutton-text { display: -moz-box !important; margin: 0 2px 1px 2px !important; }
在 2.0 中新加入以下代码:
代码 #places-bookmark { list-style-image: url("chrome://browser/skin/bookmarks/Bookmarks-toolbar.png"); -moz-image-region: rect(0px 24px 24px 0px); }
#places-subscribe { list-style-image: url("chrome://browser/skin/page-livemarks.png"); opacity: 1.0; }
#places-subscribe[disabled="true"] { opacity: 0.3; }
#bookmarksBarShowPlaces { list-style-image: url("chrome://browser/skin/places/places-icon.png"); }
/* Personal toolbar */ .toolbar-drop-indicator { height: 16px; width: 5px; margin-bottom: -8px; position: relative; background: url('chrome://browser/skin/places/toolbarDropMarker.png') 50% 50% no-repeat; }
.toolbar-drop-indicator-bar { display: none; height: 16px; margin-bottom: -16px; margin-left: 4px; position: relative; }
.toolbar-drop-indicator-bar[dragging="true"] { display: -moz-box; }
toolbarbutton.bookmark-item[dragover="true"][open="true"] { -moz-appearance: none; background: Highlight !important; color: HighlightText !important; list-style-image: url('chrome://browser/skin/places/folderDragOver.png') !important; -moz-image-region: rect(0px, 16px, 16px, 0px) !important; }
.bookmark-item[dragover-into="true"] { background: Highlight !important; color: HighlightText !important; }
.bookmark-item[dragover-top="true"] { -moz-border-top-colors: #000000; }
.bookmark-item[dragover-bottom="true"] { -moz-border-bottom-colors: #000000;
help.css 中
以下代码被添加:
代码 #context-copy[disabled="true"] { visibility: collapse; }
extensions.css 中
以下代码由 1.5.0.x 中
代码 extension[disabled="true"][compatible="false"] .extension-item-description, extension[incompatibleUpdate="true"] .extension-item-description { color: #C77173; } 在 2.0 中变为:
代码 extension[disabled="true"][compatible="false"] .extension-item-description, extension[satisfiesDependencies="false"] .extension-item-description, extension[incompatibleUpdate="true"] .extension-item-description { color: #C77173; }
profileSelection.css 中
以下代码由 1.5.0.x 中
代码 #profiles > listitem { list-style-image: url("chrome://mozapps/skin/profile/profileicon.gif"); } 在 2.0 中变为:
代码 #profiles > listitem { list-style-image: url("chrome://mozapps/skin/profile/profileicon.png"); }
相关知识库
很可惜,我知道大家很期待这部分,可是技术文档都是英文的,最关键的部分我实在没有时间翻译了,所以只好给出大家相关链接,如果有时间一定会补上,不好意思:
XUL (XML User Interface Language)
XULPlanet
HTML (HyperText Markup Language) XML (Extensible Markup Language)
RDF (Resource Description Framework)
在线安装:
如果您有自己的网站,想将自己制作的主题放到自己的主页上直接供 firefox 用户在线安装,下面的 javascript 可能会派上用场:
代码 <a href="java script:InstallTrigger.installChrome(InstallTrigger.SKIN, 'otherside.jar', '我做的主题')">安装我制作的主题</a>
在 Update 中国 发布:
如果您想将自己制作出的主题发布到 update 中国,可以在 mozine 开发者主题区发贴,格式如下: 作者: 版本号: 兼容: 简介: 更新日志: 缩略图:
如果您比较羞涩,也可以在 mozine 论坛直接给我发消息,或者给我发 email : baggio.corleone(at)gmail.com,在下一定会及时处理。
注意:修改自别人主题的作品在发布时必须征得修改许可授权,请各位作者一定要注意。 |