简体   繁体   English

在根启动器主题中的何处以及如何添加/编辑CSS

[英]Where and how to add/edit css in roots starter theme

So i downloaded roots starter theme, installed node and run npm install etc. I have a working theme now. 因此,我下载了roots入门主题,安装了节点并运行npm install等。我现在有一个有效的主题。 As i am modifying the PHP code my styles has to be synced with it. 当我修改PHP代码时,我的样式必须与其同步。 I do not understand where should i write my additional css and where should i edit existing css. 我不明白我应该在哪里写我的其他CSS以及我应该在哪里编辑现有的CSS。

For example i created a footer menu and it markedup like 例如,我创建了一个页脚菜单,并标记为

  <ul id="menu-footer" class="nav navbar-nav">
    <li class="menu-privacy-policy"><a href="#">Privacy Policy</a></li>
    <li class="menu-terms-conditions"><a href="#">Terms &amp; Conditions</a></li>
    <li class="menu-our-pledge"><a href="#">Our Pledge</a></li>
  </ul>

I have to add additional style to #menu-footer and edit bootstrap style of .nav navbar-nav It is my first time experience of looking at less, grunt , npm etc and i am in a feeling that i should not edit the assets/main.css files directly. 我必须在#menu-footer添加其他样式,并编辑.nav navbar-nav引导样式。这是我第一次尝试查看less,grunt,npm等内容,这是我第一次不应该编辑assets/main.css文件直接。

I want any reference link or advice what is the standard way of working with these type of files 我需要任何参考链接或建议,使用这些类型的文件的标准方法是什么

Thanks 谢谢

http://roots.io/roots-101/#theme-assets http://roots.io/roots-101/#theme-assets

Where you put your custom styles is going to vary on what your styling. 自定义样式的放置位置将因样式而异。 For example, Roots comes with a .less file specifically for the homepage and another specifically for styling the header or footer. 例如,Roots带有一个专门用于主页的.less文件,另一个专门用于设置页眉或页脚的样式。 This allows you to keep your styles separated and easier to maintain. 这使您可以使样式保持分离并易于维护。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM