Sometimes I like to make a separate CSS file to keep all my styling for the entire store. When I update the theme, I just copy this file to the new theme. All the CSS is in one place so it’s easy to remember and move.
有时候我们需要做一个单独的CSS文件来控制整个shopify独立站的样式。当我们更新主题的时候,我们只需要复制这些文件到新主题就可以生效。当把所有的CSS文件放在一起的时候,我们就很容易记忆并自由移动它们。

The basic method is this:
最基础的方法如下:
- Create a new CSS file in your assets folder. Give it a unique name that makes it obvious that you made it, and it wasn’t part of the theme.
在资源文件夹新建一个CSS文件。给新建的这个文件一个独一无二的命名,因此这个文件就不属于我们的原主题的一部分。
- Open up theme.liquid, and find where your main css files are included there. It should look like the above screenshot. Usually they are called base.css, global.css or main.css.
打开theme.liquid文件,并且找到我们主CSS文件所在位置。就像上图 所示。往往主题开发者会将主CSS命名为 base.css, global.css 或者 main.css。
3.Add your own css using {{ ‘your-file-name.css’ | asset_url | stylesheet_tag }}
使用{{ ‘your-file-name.css’ | asset_url | stylesheet_tag }}来添加我们新建的CSS文件。




