POV-Ray : Newsgroups : povray.off-topic : CSS can be fun Server Time
3 Sep 2024 23:29:25 EDT (-0400)
  CSS can be fun (Message 14 to 23 of 23)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Phil Cook v2
Subject: Re: CSS can be fun
Date: 22 Sep 2010 05:04:02
Message: <op.vjffg6bsmn4jds@phils>
And lo On Wed, 22 Sep 2010 09:03:40 +0100, Invisible <voi### [at] devnull> did  
spake thusly:

>> yeah, what percentage of your 2 blog readers would possibly be using  
>> IE?...

Ow!

> Maybe if enough web pages are broken in IE, people will start asking why  
> MS produces such a defective product. (But I doubt it...)

Nah they'd just wonder why you can't write a proper web site like everyone  
else.

-- 
Phil Cook

--
I once tried to be apathetic, but I just couldn't be bothered
http://flipc.blogspot.com


Post a reply to this message

From: Phil Cook v2
Subject: Re: CSS can be fun
Date: 22 Sep 2010 05:12:40
Message: <op.vjffvku7mn4jds@phils>
And lo On Tue, 21 Sep 2010 17:18:09 +0100, nemesis  
<nam### [at] gmailcom> did spake thusly:

> Invisible escreveu:
>> On 21/09/2010 01:50 PM, Invisible wrote:
>>
>>> Yeah, I know, there's hardly anything ground-breaking in here.
>>  I'm particularly pleased with how I managed to insert chevrons  
>> *between* the links, but not before or after them. That look some  
>> figuring out.
>>  (The trick is to do :before {content: " > ";} and then do  
>> :first-child:before {content: "Navigation: ";}. You can even put  
>> additional styling in there; I've put "Navigation" in bold, for  
>> example.)
>
> I was thinking about how you managed that one.
> Guess I'm missing latest CSS goodies, cause I've not heard of "content:"  
> before...

As Invisible says it's one of those old ones that never got used because  
certain well-used browsers never implemented it. It also takes an attr()  
so you can pull an attribute from the element and present it. So you could  
have every <acronym> element end with the title attribute for instance. It  
gets even better with CSS3 as that allows styling by type of link so you  
can do things like:

a[href$='.pdf']:after { content: " (PDF)"; }

and every pdf link will add that content to the end of the link  
automatically.

I mean it's only taken, what, 12+ years to get to this level :-)

-- 
Phil Cook

--
I once tried to be apathetic, but I just couldn't be bothered
http://flipc.blogspot.com


Post a reply to this message

From: Invisible
Subject: Re: CSS can be fun
Date: 22 Sep 2010 05:37:01
Message: <4c99ce3d$1@news.povray.org>
On 22/09/2010 10:12 AM, Phil Cook v2 wrote:

> As Invisible says it's one of those old ones that never got used because
> certain well-used browsers never implemented it.

Or rather, "no browsers on Earth actually implemented it at all".

> I mean it's only taken, what, 12+ years to get to this level :-)

I'm still waiting for the day when you can take an ordinary <table> 
element with no special markup, and style is so that each row as an 
alternating background colour. :-P

(Currently the only way to do this is to assign different style classes 
to each row.)


Post a reply to this message

From: Phil Cook v2
Subject: Re: CSS can be fun
Date: 22 Sep 2010 05:54:16
Message: <op.vjfhswg2mn4jds@phils>
And lo On Wed, 22 Sep 2010 10:37:00 +0100, Invisible <voi### [at] devnull> did  
spake thusly:

> On 22/09/2010 10:12 AM, Phil Cook v2 wrote:
>
>> As Invisible says it's one of those old ones that never got used because
>> certain well-used browsers never implemented it.
>
> Or rather, "no browsers on Earth actually implemented it at all".
>
>> I mean it's only taken, what, 12+ years to get to this level :-)
>
> I'm still waiting for the day when you can take an ordinary <table>  
> element with no special markup, and style is so that each row as an  
> alternating background colour. :-P
>
> (Currently the only way to do this is to assign different style classes  
> to each row.)

Off the top of my head I don't know which browsers support :nth-child(),  
but I'm betting the latest releases of IE don't. Tum te tum oh yes what a  
surprise it doesn't; the latest versions of Firefox do though so you can  
use it if you want.

-- 
Phil Cook

--
I once tried to be apathetic, but I just couldn't be bothered
http://flipc.blogspot.com


Post a reply to this message

From: Invisible
Subject: Re: CSS can be fun
Date: 22 Sep 2010 06:00:09
Message: <4c99d3a9@news.povray.org>
>> I'm still waiting for the day when you can take an ordinary <table>
>> element with no special markup, and style is so that each row as an
>> alternating background colour. :-P
>>
>> (Currently the only way to do this is to assign different style
>> classes to each row.)
>
> Off the top of my head I don't know which browsers support :nth-child(),
> but I'm betting the latest releases of IE don't. Tum te tum oh yes what
> a surprise it doesn't; the latest versions of Firefox do though so you
> can use it if you want.

I hadn't even heard about :nth-child. (What, still no :last-child yet?) 
That still doesn't help me style a table with some arbitrary number of 
rows, where I want the odd rows blue and the even rows yellow.


Post a reply to this message

From: Phil Cook v2
Subject: Re: CSS can be fun
Date: 22 Sep 2010 06:08:57
Message: <op.vjfihcaxmn4jds@phils>
And lo On Wed, 22 Sep 2010 11:00:07 +0100, Invisible <voi### [at] devnull> did  
spake thusly:

>>> I'm still waiting for the day when you can take an ordinary <table>
>>> element with no special markup, and style is so that each row as an
>>> alternating background colour. :-P
>>>
>>> (Currently the only way to do this is to assign different style
>>> classes to each row.)
>>
>> Off the top of my head I don't know which browsers support :nth-child(),
>> but I'm betting the latest releases of IE don't. Tum te tum oh yes what
>> a surprise it doesn't; the latest versions of Firefox do though so you
>> can use it if you want.
>
> I hadn't even heard about :nth-child. (What, still no :last-child yet?)  
> That still doesn't help me style a table with some arbitrary number of  
> rows, where I want the odd rows blue and the even rows yellow.

We're cross-threading here so I'll just repeat tr:nth-child(odd){} Oh and  
nth-last-child() will select elements backwards, but besides there is a  
:last-child. All hail CSS3.

-- 
Phil Cook

--
I once tried to be apathetic, but I just couldn't be bothered
http://flipc.blogspot.com


Post a reply to this message

From: Invisible
Subject: Re: CSS can be fun
Date: 22 Sep 2010 06:37:22
Message: <4c99dc62$1@news.povray.org>
>> I hadn't even heard about :nth-child. (What, still no :last-child
>> yet?) That still doesn't help me style a table with some arbitrary
>> number of rows, where I want the odd rows blue and the even rows yellow.
>
> We're cross-threading here so I'll just repeat tr:nth-child(odd){} Oh
> and nth-last-child() will select elements backwards, but besides there
> is a :last-child. All hail CSS3.

And, uh, how many years will it be before any browser anywhere starts to 
implement CSS3?


Post a reply to this message

From: Invisible
Subject: Re: CSS can be fun
Date: 22 Sep 2010 09:55:21
Message: <4c9a0ac9@news.povray.org>
On 21/09/2010 03:27 PM, Le_Forgeron wrote:
> Le 21/09/2010 16:19, Invisible a écrit :
>>>> Irritatingly, what you *cannot* do is content: "→ ". This is
>>>> extremely frustrating, and currently I cannot find any way around this
>>>> flaw.
>>>
>>> content: "\2192"
>>
>> Oh God, you *are* kidding me, right?? o_O
>
> content: is not reparsed by the engine, so no entities would be
> substituted, but that should not stop you to encode the right char.

It's even weirder than that: If the CSS is a seperate file (like it 
normally is), this doesn't work. But if it's inline inside the HTML 
file, then it *does* work. (!)

Presumably because the character stream inside the <style> element in 
the document head has entities expanded during parsing.


Post a reply to this message

From: nemesis
Subject: Re: CSS can be fun
Date: 22 Sep 2010 14:07:58
Message: <4c9a45fe$1@news.povray.org>
Invisible escreveu:
>>> I hadn't even heard about :nth-child. (What, still no :last-child
>>> yet?) That still doesn't help me style a table with some arbitrary
>>> number of rows, where I want the odd rows blue and the even rows yellow.
>>
>> We're cross-threading here so I'll just repeat tr:nth-child(odd){} Oh
>> and nth-last-child() will select elements backwards, but besides there
>> is a :last-child. All hail CSS3.
> 
> And, uh, how many years will it be before any browser anywhere starts to 
> implement CSS3?

meanwhile, I'd output <tr class="odd"> and style that with ".odd {}"

-- 
a game sig: http://tinyurl.com/d3rxz9


Post a reply to this message

From: Phil Cook v2
Subject: Re: CSS can be fun
Date: 24 Sep 2010 04:39:20
Message: <op.vji3nwvrmn4jds@phils>
And lo On Wed, 22 Sep 2010 11:37:21 +0100, Invisible <voi### [at] devnull> did  
spake thusly:

>>> I hadn't even heard about :nth-child. (What, still no :last-child
>>> yet?) That still doesn't help me style a table with some arbitrary
>>> number of rows, where I want the odd rows blue and the even rows  
>>> yellow.
>>
>> We're cross-threading here so I'll just repeat tr:nth-child(odd){} Oh
>> and nth-last-child() will select elements backwards, but besides there
>> is a :last-child. All hail CSS3.
>
> And, uh, how many years will it be before any browser anywhere starts to  
> implement CSS3?

Works in my copy of FireFox, Opera and Chrome.

-- 
Phil Cook

--
I once tried to be apathetic, but I just couldn't be bothered
http://flipc.blogspot.com


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.