Suppress linebreak before lists globally

79 views
Skip to first unread message

Stobot

unread,
Jun 6, 2017, 10:19:02 AM6/6/17
to TiddlyWiki
What's the easiest way to globally suppress the line that gets added before a bulleted or numbered list?

I'm looking for...

List topics:
- Topic 1
- Topic 2
- Topic 3
- ...

On the edit side:
Sometimes I'll use a !!!! header just so I don't have to see it on the edit side. Not a big deal, but if there's another way, I'd be grateful

On the display side:
I can't figure out how to globally change this at all. All I can generate is:

List topics:
<line I don't want>
- Topic 1
- Topic 2
- Topic 3
- ...

Using Chrome in newest TW5 version in case it matters. I think I figured it out years ago in the classic version by messing with the ViewTemplate...

Thanks anyone who has ideas!

Eskha

unread,
Jun 6, 2017, 11:58:43 AM6/6/17
to TiddlyWiki
Hi Stobot,

This is indeed one of the few TW frustrating behavior.

On the display side you can use css to achieve the expected result.

Here is an extract of the StyleSheet I use to overcome this issue (and define left indentation)
(You have to put the following  text in a tiddler
Title: whatever you like
Tags: $:/tags/Stylesheet) :
Type: text/css)

/* Simple Paragraph */

html .tc-tiddler-body p {
    margin: 0.8em 0em 0.2em 0em;
    padding: 0em 0em 0em 0em;
    text-indent: 2em;
}


/* Unordered lists */

html .tc-tiddler-body ul {
    margin: 0em 0em 0em 0em;
    padding: 0em 0em 0em 3em;
}

html .tc-tiddler-body ul ul {padding-left: 1.25em;}


/* Ordered lists */

html .tc-tiddler-body ol {
    margin: 0em 0em 0em 0em;
    padding: 0em 0em 0em 3em;
}

html .tc-tiddler-body ol ol {padding-left: 1.25em;}


/* Lists item */

html .tc-tiddler-body li {
    margin: 0.2em 0em 0em 0em;
    padding: 0em 0em 0em 0em;
}


Best regards.

Eskha

Stobot

unread,
Jun 6, 2017, 1:47:15 PM6/6/17
to TiddlyWiki
Thanks Eskha, I appreciate you taking a look. 

It doesn't look like it's working as intended though... It's indenting normal text sometimes and the blank lines are still there... Maybe I've done it wrong?
I put up http://stobot.tiddlyspot.com as an example so maybe you can see what I did wrong. 

PMario

unread,
Jun 6, 2017, 3:48:16 PM6/6/17
to TiddlyWiki
Hi Stobot,

In your particular usecase it's the h4 margin-bottom that's the problem.

So you may be able to use something like this:

!!!!.test Your heading text

Add the following to MyCSS:

.test {
  margin-bottom: 5px;
}

or something similar. ... This method will add a class="test" to your heading element. So it won't change h4 globally, which may not be wanted. ... If you want to change h4 globally, just replace .test above with

h4 {
  margin-bottom: 5px;
}

But I would not recommend this. ..

have fun!
mario

Stobot

unread,
Jun 6, 2017, 8:28:38 PM6/6/17
to TiddlyWiki
Thanks PMario, that leads me in the right direction

Looks like for my situation, to make the extra line disappear, I have to use about -13px. My OCD wishes I didn't have to pick an arbitrary number, but it looks much better now to me.

I appreciate both of you taking your time to help!
Reply all
Reply to author
Forward
0 new messages