简体   繁体   English

Pattern Lab CSS的更改不起作用

[英]Changes in CSS of Pattern Lab not working

I am new to Pattern Lab. 我是Pattern Lab的新手。 I have installed Pattern Lab PHP Mustache Template. 我已经安装了Pattern Lab PHP Mustache模板。

I can edit patterns and see changes on the output. 我可以编辑模式并查看输出的更改。 However if I edit the css files, changes don't reflect on the output. 但是,如果我编辑css文件,则更改不会反映在输出中。 I use php core/console --generate to generate files but still won't work on the css. 我使用php core / console --generate来生成文件,但仍然无法在CSS上工作。

How do I generate the CSS so that the changes would reflect on the output? 如何生成CSS,以便更改可以反映在输出中?

Thanks. 谢谢。

That would be because Pattern lab styleguide is rendered in an iframe. 那是因为Pattern Lab样式指南是在iframe中呈现的。 So all the generated CSS is living there. 因此,所有生成的CSS都住在这里。

In order to change it, you should fork the styleguide starterkit and customize it as suggested here: https://github.com/pattern-lab/patternlab-php/issues/380 . 为了对其进行更改,您应该派生styleguide starterkit并按照此处的建议对其进行自定义: https : //github.com/pattern-lab/patternlab-php/issues/380

You can customize Pattern Lab's UI by forking this: https://github.com/pattern-lab/styleguidekit-assets-default and adjusting the styles and markup there. 您可以通过分叉以下内容来自定义Pattern Lab的UI: https//github.com/pattern-lab/styleguidekit-assets-default并在那里调整样式和标记。

In your css code use !important Like this, 在您的CSS代码中使用!important这样,

div{
background-color: red !important;
}

This should definetly work. 这应该明确地工作。

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

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