如何将CSS应用于StyleDocco输出文档 [英] How to have CSS applied to StyleDocco output docs

查看:103
本文介绍了如何将CSS应用于StyleDocco输出文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将模板设置为 styledocco 来使用 grunt-styleguide 来生成CSS样式指南。



当我运行任务时,它可以正常工作,但 styledocco 输出文件没有应用CSS演示元素。



我的grunt初始化为styleguide:

  styleguide:{
dist:{
options:{
framework:{
name:styledocco
},

name :FE KICKSTARTER V1.o
},

文件:{
assets / css / styleguide:assets / css / ** / *。less
}
}
}

我的输出如下:





上图中,测试文本和按钮应该已应用样式。我已经检查过配置,事情看起来不错,但不知道缺少什么。



如何使这项工作成功?

解决方案

@ chris-vdp 绝对会让您处于正确的方向。 http://shekhardesigner.github.io中的评论/fe-kickstart/assets/css/styleguide/base-base.html 未被识别为有效的降价。在您的少代码中替换:

  / *基本
============= ==

这是一个简单的Base CSS

< div class =h1> H1 type headers< / div>
$ b $ /

含有:

  / * 
基准
===============

此是一个简单的Base CSS

< div class =h1> H1 type headers< / div>
$ b $ /

删除错误的选项卡,您的样式指南将如下所示:


I am using grunt-styleguide with my template is set to styledocco to generate CSS style guides.

When I run the task, it works but the styledocco output files do not have CSS applied to demo elements.

My grunt init for styleguide:

styleguide: {
        dist: {
            options: {
                framework: {
                    name: "styledocco"
                },

                name: "FE KICKSTARTER V1.o"
            },

            files: {
                "assets/css/styleguide": "assets/css/**/*.less"
            }
        }
    }

My outputs are as follows:

Above image, test text and button should have been styles applied. I have checked configs, things seem fine but not sure what is missing.

How do I make this work?

解决方案

@chris-vdp definitely puts you in the right direction. The comments in http://shekhardesigner.github.io/fe-kickstart/assets/css/styleguide/base-base.html are not recognized as valid markdown. In your Less code replace:

/*  Base
===============

    This is a simple Base CSS

    <div class="h1">H1 type headers</div>

*/

with:

/*  
Base
===============

This is a simple Base CSS

    <div class="h1">H1 type headers</div>

*/

After removing the wrong tabs your style guide will look like that shown below:

这篇关于如何将CSS应用于StyleDocco输出文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆