小编zer*_*per的帖子

带有汇编的生成页面的路径

我正在努力处理grunt-assemble grunt任务配置,如下所示:

assemble: {
  options: {
    flatten: false,
    expand: true,

    assets: '',

    layout: 'default.hbs',
    layoutdir: 'templates/layouts',

    partials: ['templates/includes/*.hbs'],
    helpers: ['templates/helpers/*.js'],
    data: ['templates/data/*.{json,yml}']
  },

  dev: {
    src: 'templates/pages/**/*.hbs',
    dest: 'build/'
  }
Run Code Online (Sandbox Code Playgroud)

assemble.io项目模板的脚手架如下所示:

templates
??? helpers
??? includes
?   ??? page-footer.hbs
?   ??? page-header.hbs
?   ??? scripts.hbs
??? layouts
?   ??? default.hbs
??? pages
    ??? en
    ?   ??? index.hbs
    ??? fr
    ?   ??? index.hbs
    ??? index.hbs
Run Code Online (Sandbox Code Playgroud)

我希望得到类似的东西:

build
??? en
?   ??? index.html
??? fr
?   ??? index.html
??? index.html
Run Code Online (Sandbox Code Playgroud)

但相反,我得到类似的东西: …

gruntjs assemble grunt-assemble

9
推荐指数
1
解决办法
2073
查看次数

为什么Firefox不使用空tbody渲染表的边框?

当表具有空tbody时,Firefox无法正确呈现表格单元格边框.

但是如果你使用伪选择器 tbody:empty {display:none;}隐藏tbody元素,则所有内容都按预期呈现.

的jsfiddle

table {
    border-collapse: collapse;
}
th,
td {
    border: 1px solid #000;
}

.fixed tbody:empty {
    display: none;
}
Run Code Online (Sandbox Code Playgroud)
<table class="broken">
    <thead>
        <tr>
            <th>1</th>
            <td>2</td>
            <td>3</td>
        </tr>
    </thead>
    <tbody></tbody>
    <tfoot>
        <tr>
            <th>1</th>
            <td>2</td>
            <td>3</td>
        </tr>
    </tfoot>
</table>

<hr />

<table class="fixed">
    <thead>
        <tr>
            <th>1</th>
            <td>2</td>
            <td>3</td>
        </tr>
    </thead>
    <tbody></tbody>
    <tfoot>
        <tr>
            <th>1</th>
            <td>2</td>
            <td>3</td>
        </tr>
    </tfoot>
</table>
Run Code Online (Sandbox Code Playgroud)

css firefox border

7
推荐指数
1
解决办法
1206
查看次数

标签 统计

assemble ×1

border ×1

css ×1

firefox ×1

grunt-assemble ×1

gruntjs ×1