3.4.2. 向主题添加一个风格表
您可以在主题中添加一个或多个风格表。
流程
-
在主题的 <
;THEME TYPE>/resources/css目录中创建一个文件。 将此文件添加到
theme.properties中的styles属性中。例如,要将
styles.css添加到mytheme中,请使用以下内容创建themes/mytheme/login/resources/css/styles.css:.login-pf body { background: DimGrey none; }编辑
themes/mytheme/login/theme.properties并添加:styles=css/styles.css要查看更改,请打开您的域的登录页面。
您会注意到应用的唯一风格是来自您的自定义风格表。
要包含父主题的样式,请从该主题加载样式。编辑
themes/mytheme/login/theme.properties,并将样式更改为:styles=css/login.css css/styles.css注意要覆盖父风格表中的样式,请确保最后列出了您的风格表。