TW5: How to color background of text even if it's in a list item

60 views
Skip to first unread message

Chuck R.

unread,
Dec 9, 2019, 12:55:24 PM12/9/19
to TiddlyWiki
My specs: Using TW5.1.19 and normal TW language, using Firefox browser, TW is on tiddlyspot.com

I'd like to give part of the text that is contained in a list item a gray background color. I don't want to color all the text in that list item. I'm entering text using Tiddlywiki language.

# This is an item before colored text.
# This is not colored. <span style="background-color:#c0c0c0;">This has a colored background</span> This is stuff after the colored background.
# This is after the list item with colored text.
# You can also set up a style .class to do this.

I thought the newer people might like this.

Eric Shulman

unread,
Dec 9, 2019, 1:09:58 PM12/9/19
to TiddlyWiki
On Monday, December 9, 2019 at 9:55:24 AM UTC-8, Chuck R. wrote:
I'd like to give part of the text that is contained in a list item a gray background color. I don't want to color all the text in that list item. I'm entering text using Tiddlywiki language. 
# This is an item before colored text.
# This is not colored. <span style="background-color:#c0c0c0;">This has a colored background</span> This is stuff after the colored background.
# This is after the list item with colored text.
# You can also set up a style .class to do this.

Note: While HTML syntax always works, you can also use the "@@" TW syntax for specifying CSS styles around a given piece of text.  You can also use the abbreviated three-digit color codes, such as "#ccc", or X11 color names, such as "lightgray"

Thus:
# This is not colored. @@background-color:lightgray; This has a colored background@@ This is stuff after the colored background.

enjoy,
-e

 
Reply all
Reply to author
Forward
0 new messages