Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的主人中,加载了部分 _styles。在这个 _styles 中有一个 ^var styles = "" 现在在我的所有视图或部分中,我可以说 var styles = styles+"another style"
通常,样式定义为
%link{ href="../../content/css/partial.css" rel="stylesheet" type="text/css" }
如何将 %link 指令的输出附加到样式变量?
我写了一篇关于使用 NHAML 添加样式和链接的帖子。 这应该为您完成所有工作。