M
M
Mangor2014-05-07 12:18:28
HTML
Mangor, 2014-05-07 12:18:28

Inline-block padding and jade templating engine

How to comment out space between inline-block elements in Jade templates.
The HTML structure is something like this:

<ul>
      <li>Item 1</li><!--
   --><li>Item 2</li>
</ul>

I know how to remove padding between inline-block elements using css, I'm only interested in this option.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
K
Konstantin Kitmanov, 2014-05-07
@Mangor

In general, by default, jade removes all whitespace characters between tags, unless you set the pretty option to true.

A
Anna Bakurova, 2014-05-08
@Libris

As I understand it, you should choose the way yourself

L
lnked, 2014-05-07
@lnked

<ul>
      <li>Item 1</li>
      <li>Item 2</li>
</ul>

so that there is no indentation, you need to make the font size 0
ul { font-size: 0; }
ul li { font-size: 10px; display: inline-block; } // фикс для ie 6 и 7 надо zoom: 1; display: inline;

K
Konstantin Velichko, 2014-05-07
@Zoxon

Use escaping, will output as plain text

| <li>Item 1</li><!--
| --><li>Item 2</li>

or so,
in general, experiment, I don’t quite understand why this is all

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question