[tw] Re: TW5 How to make each tab in a tabmenu a different background colour?

2017-01-22 Thread Mat
cmari,

I've been wishing for something like this - thanks! However, I think it 
> doesn't work with your Tablinks.
>

Ok, here's a solution for both regular tabs as well as tablinks (...and, by 
the way, it omits the need for the *tag *in the tiddler by simply using a 
div (doh!) )



<>


.foo .tc-tab-buttons button:nth-of-type(1) {background:blue;}
.foo .tc-tab-buttons button:nth-of-type(2) {background:red;}
.foo .tc-tab-buttons button:nth-of-type(3) {background:green;}
.foo .tc-tab-buttons button:nth-of-type(4) {background:yellow;}



BTW... what IS with the colored tabs? Why do people want this???

<:-)


On Saturday, January 21, 2017 at 4:30:33 PM UTC-8, Mat wrote:
>
> On Saturday, January 21, 2017 at 7:29:38 PM UTC+1, Odder wrote:
>>
>> I have a tebmenu with 6 tabs and I want each tab with a different 
>> background-color? Is this possible maybe with css?
>> Odder
>>
>
> Yes, unless I misunderstand you. 
>
> title:whateveryouwant
> tags:colortabs
>
> <>
>
> 
> .tc-tagged-colortabs .tc-tab-buttons button:nth-child(1) {background:blue
> ;}
> .tc-tagged-colortabs .tc-tab-buttons button:nth-child(2) {background:green
> ;}
> .tc-tagged-colortabs .tc-tab-buttons button:nth-child(3) {background:
> yellow;}
> .tc-tagged-colortabs .tc-tab-buttons button:nth-child(4) {background:red;}
>  
>
> The reason you need the tag "colortabs" is to prevent the styling from 
> affecting all tabs in the TW. Instead you can then use .tc-tagged-colortabs 
> to limitit it to that particular tiddler.
>
> Generally, you'd not want to put the styles in the tiddler itself but in a 
> separate stylesheet tiddler, i.e any tiddler with the tag 
> "$:/tags/Stylesheet". And you omit the 

[tw] Re: TW5 How to make each tab in a tabmenu a different background colour?

2017-01-22 Thread cmari
Hi Mat,
I've been wishing for something like this - thanks! However, I think it 
doesn't work with your Tablinks. It only worked for me when I reverted to 
the shadow version of $:/core/macros/tabs.
With the Tablinks version of $:/core/macros/tabs, if I create the 
whateveryourwant tiddler in your example and inspect the elements, it looks 
as though the second tab has become nth-child(3) and the third and fourth 
tabs aren't nth-children at all. But I don't even know if that's the real 
problem. Sorry to only be able to report things rather than offer 
solutions. I'm really hoping there's a way to get both colors and links on 
tabs!
Thanks,
cmari

On Saturday, January 21, 2017 at 4:30:33 PM UTC-8, Mat wrote:
>
> On Saturday, January 21, 2017 at 7:29:38 PM UTC+1, Odder wrote:
>>
>> I have a tebmenu with 6 tabs and I want each tab with a different 
>> background-color? Is this possible maybe with css?
>> Odder
>>
>
> Yes, unless I misunderstand you. 
>
> title:whateveryouwant
> tags:colortabs
>
> <>
>
> 
> .tc-tagged-colortabs .tc-tab-buttons button:nth-child(1) {background:blue
> ;}
> .tc-tagged-colortabs .tc-tab-buttons button:nth-child(2) {background:green
> ;}
> .tc-tagged-colortabs .tc-tab-buttons button:nth-child(3) {background:
> yellow;}
> .tc-tagged-colortabs .tc-tab-buttons button:nth-child(4) {background:red;}
>  
>
> The reason you need the tag "colortabs" is to prevent the styling from 
> affecting all tabs in the TW. Instead you can then use .tc-tagged-colortabs 
> to limitit it to that particular tiddler.
>
> Generally, you'd not want to put the styles in the tiddler itself but in a 
> separate stylesheet tiddler, i.e any tiddler with the tag 
> "$:/tags/Stylesheet". And you omit the 

[tw] Re: TW5 How to make each tab in a tabmenu a different background colour?

2017-01-22 Thread Tobias Beer
Hi Odder & Mat,

Nevertheless, I made a Pull Request that would allow setting a *tab-class* 
using a field by that name:

*#2724 allows to specify a button class for tab buttons*
https://github.com/Jermolene/TiddlyWiki5/pull/2724

Best wishes,

Tobias.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3ee7cea5-29d8-4780-9f52-e1e5c4073753%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: TW5 How to make each tab in a tabmenu a different background colour?

2017-01-22 Thread PMario
Hi Odder,

There is already a pull request open for discussion: 
https://github.com/Jermolene/TiddlyWiki5/pull/2724  
So it may end up in the core. ... BUT no promises :)  but some +1's at the 
PR may help a bit.

-m

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/86ca-de03-43d4-a934-3b299e173e2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: TW5 How to make each tab in a tabmenu a different background colour?

2017-01-22 Thread Odder
Hi PMario and Mat,

@PMario
I create normal <>

@Mat
Thank you very much for your tip. That did the job as desired :-)

Thanks both for your help.

Odder



Am Samstag, 21. Januar 2017 19:29:38 UTC+1 schrieb Odder:
>
> I have a tebmenu with 6 tabs and I want each tab with a different 
> background-color? Is this possible maybe with css?
> Odder
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/222c233d-ffd1-44d6-b944-94199f28dfae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: TW5 How to make each tab in a tabmenu a different background colour?

2017-01-21 Thread Mat
On Saturday, January 21, 2017 at 7:29:38 PM UTC+1, Odder wrote:
>
> I have a tebmenu with 6 tabs and I want each tab with a different 
> background-color? Is this possible maybe with css?
> Odder
>

Yes, unless I misunderstand you. 

title:whateveryouwant
tags:colortabs

<>


.tc-tagged-colortabs .tc-tab-buttons button:nth-child(1) {background:blue;}
.tc-tagged-colortabs .tc-tab-buttons button:nth-child(2) {background:green;}
.tc-tagged-colortabs .tc-tab-buttons button:nth-child(3) {background:yellow
;}
.tc-tagged-colortabs .tc-tab-buttons button:nth-child(4) {background:red;}
 

The reason you need the tag "colortabs" is to prevent the styling from 
affecting all tabs in the TW. Instead you can then use .tc-tagged-colortabs 
to limitit it to that particular tiddler.

Generally, you'd not want to put the styles in the tiddler itself but in a 
separate stylesheet tiddler, i.e any tiddler with the tag 
"$:/tags/Stylesheet". And you omit the 

[tw] Re: TW5 How to make each tab in a tabmenu a different background colour?

2017-01-21 Thread PMario
On Saturday, January 21, 2017 at 7:29:38 PM UTC+1, Odder wrote:
>
> I have a tebmenu with 6 tabs and I want each tab with a different 
> background-color? Is this possible maybe with css?
>

How did you create your tabmenu?

-m

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/d5e6cec3-c815-4aeb-a652-f895b14d1a4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: TW5 How to make each tab in a tabmenu a different background colour?

2017-01-21 Thread PMario
On Saturday, January 21, 2017 at 7:29:38 PM UTC+1, Odder wrote:
>
> I have a tebmenu with 6 tabs and I want each tab with a different 
> background-color? Is this possible maybe with css?
> Odder
>

Hi Odder,
Not with the current implementation of the tabs macro. But it should be 
straight forward to create a custom macro. 
-mario
 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ce3cc34e-ae69-464a-9376-cfc90c4b239b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.