[TW5] Do not print tags

300 views
Skip to first unread message

David Gifford

unread,
Aug 30, 2014, 7:52:52 AM8/30/14
to tiddl...@googlegroups.com
Hi all

What would be the appropriate CSS to avoid printing ViewTemplate/tags?

Andreas Hahn

unread,
Aug 30, 2014, 8:29:57 AM8/30/14
to tiddl...@googlegroups.com
Hi David,

either remove the $:/tags/ViewTemplate tag from $:/core/ui/ViewTemplate/tags or hide the tags wrapper:

.tw-tags-wrapper {
    display: none;
}

/Andreas


Am 30.08.2014 13:52, schrieb David Gifford:
Hi all

What would be the appropriate CSS to avoid printing ViewTemplate/tags?
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

David Gifford

unread,
Aug 30, 2014, 8:50:50 AM8/30/14
to tiddl...@googlegroups.com
Thanks, Andreas, but your solutions eliminate the tags from viewing in the TW. I want the tags to appear in the TW. I just don't want them to print.

I tried

@media print {#tw-tags-wrapper {display: none ! important;}}

but that didn't work.


--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/ak-ADjDkBgo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.



--
David Gifford
Christian Reformed World Missions, Mexico City

Andreas Hahn

unread,
Aug 30, 2014, 9:03:00 AM8/30/14
to tiddl...@googlegroups.com
Hi David,

yes that does not work, you are hiding #tw-tags-wrapper when instead it should be .tw-tags-wrapper:

@media print {.tw-tags-wrapper {display: none;}}

When I try it with that, it works.

/Andreas

David Gifford

unread,
Aug 30, 2014, 9:06:31 AM8/30/14
to tiddl...@googlegroups.com
Thanks! That did the trick. I should have thought of that!

PMario

unread,
Aug 31, 2014, 1:20:23 PM8/31/14
to tiddl...@googlegroups.com
On Saturday, August 30, 2014 2:50:50 PM UTC+2, David Gifford wrote:
@media print {#tw-tags-wrapper {display: none ! important;}}

Just to clarify.
 
the hash in CSS means the ID
eg some HTML code with an id:

<p id="myID"> some text </p>

CSS

#myID { background: yellow; }

IDs should be not used with TW, since there can be more than one tiddler active at the same time.
TW needs to work with classes.

-----

some code with a class

<div class="tw-my-wrapper" >
<p> some text </p>
</div>

CSS

.tw-my-wrapper{ display: none;}


Important:

If you ever need a construction like this: { display: none !important; } you need to file a bug!
IMO !important is a virus. If I'd like to modify your theme I'd need to modify your template and add a style="i am more important" and then we are stuck.

see: http://www.stubbornella.org/content/2010/07/01/top-5-mistakes-of-massive-css/

have fun!
mario


David Gifford

unread,
Aug 31, 2014, 6:07:57 PM8/31/14
to tiddl...@googlegroups.com
Thanks Mario

I always thought # meant div and . meant class...so when . doesn't work I try #...

And I use the !important because years ago someone told me I needed to do it for do not print in TiddlyWiki classic, so I just carried it over. Never tried the do not print without it.

Dave


--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/ak-ADjDkBgo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

PMario

unread,
Sep 1, 2014, 1:40:10 AM9/1/14
to tiddl...@googlegroups.com
On Monday, September 1, 2014 12:07:57 AM UTC+2, David Gifford wrote:
And I use the !important because years ago someone told me I needed to do it for do not print in TiddlyWiki classic, so I just carried it over. Never tried the do not print without it.

After a closer look, I think the "do not print" usecase is one of the cases, where it actually makes sense,
if it is covered in a  @media print {} construction. ... So what ever someone else specifies you don't want to print it.

But with every other  usecase we should have a closer look.

-mario



 

PMario

unread,
Sep 1, 2014, 1:57:34 AM9/1/14
to tiddl...@googlegroups.com
On Monday, September 1, 2014 12:07:57 AM UTC+2, David Gifford wrote:
I always thought # meant div and . meant class...so when . doesn't work I try #...
:)

The mozilla developer network has some very good info about "all things internet"
see: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_started/Selectors

have fun!
mario

Michael

unread,
Oct 16, 2014, 10:53:24 AM10/16/14
to tiddl...@googlegroups.com
I am actually trying to achieve a similar thing:

I would like to print tiddlers without the tags and without the modification date (and the modyfier, but I currently do not use a name here).

I tried to put


   @media print {.tw-tags-wrapper {display: none;}}

in my custom stylesheet tiddler (tagged $:/tags/Stylesheet), but that alone does not seem to be sufficient. Firefox still prints the tags.

And what would be the CSS class required to hide the tiddler modification date for print?

Thanks a lot,
Michael

David Gifford

unread,
Oct 16, 2014, 10:57:00 AM10/16/14
to tiddl...@googlegroups.com
Try

@media print {.tc-tags-wrapper {display: none ! important;}}


Michael

unread,
Oct 16, 2014, 11:19:32 AM10/16/14
to tiddl...@googlegroups.com
Great, works now! What about the modification date? What would I need to put into the CSS to hide that one as well at print?

Best regards,
Michael

David Gifford

unread,
Oct 16, 2014, 11:29:39 AM10/16/14
to tiddl...@googlegroups.com
Hmm not sure, I usually hide that one completely by untagging $:/tags/ViewTemplate from that tiddler ($:/core/ui/ViewTemplate/subtitle).

Michael

unread,
Oct 16, 2014, 12:15:41 PM10/16/14
to tiddl...@googlegroups.com
Related question: can the AboveStory Content be hidden as well when printing?

One could of course temporarily untag it, but that seems kind of cumbersome!

Best regards,
Michael

Eric Shulman

unread,
Oct 16, 2014, 1:11:16 PM10/16/14
to tiddl...@googlegroups.com
On Thursday, October 16, 2014 7:53:24 AM UTC-7, Michael wrote:
I would like to print tiddlers without the tags and without the modification date (and the modyfier, but I currently do not use a name here).
I tried to put
   @media print {.tw-tags-wrapper {display: none;}}
in my custom stylesheet tiddler (tagged $:/tags/Stylesheet), but that alone does not seem to be sufficient. Firefox still prints the tags.

The "tw-" prefix is no longer used on CSS classnames defined by the TW core.  Instead, the classnames begin with "tc-" (TiddlyWiki Class).  Thus, try:
@media print {.tc-tags-wrapper {display: none;}}

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
Reply all
Reply to author
Forward
0 new messages