[css-d] CSS3 Selectors

2013-06-12 Thread Tom Livingston
List, I use selectivizr frequently. Do you use this or something like it? What's your method for dealing with, for example, a lack of support for: p:nth-of-type(3n){ color: red; } TIA! -- Tom Livingston | Senior Front-End Developer | Media Logic | ph: 518.456.3015x231 | fx: 518.456.4279

Re: [css-d] CSS3 Selectors

2013-06-12 Thread Micky Hulse
Are you using it for anything mission critical? Personally, I let something like that gracefully degrade. Or, looking at: http://caniuse.com/#search=nth- Seems like contemporary browsers have a handle on that. Sometimes I'll just make sure there's an alternative option (or, it degrades

Re: [css-d] CSS3 Selectors

2013-06-12 Thread Frank Taylor
So far I've only had to really use the :nth-type selectors for tables, and for creating some demos on layouts. When it comes to tables, I'd created an html table-maker that optionally generates helper classes. Outside of tables, I really haven't had projects that required :nth-child support

Re: [css-d] CSS3 Selectors

2013-06-12 Thread Tom Livingston
On Wed, Jun 12, 2013 at 4:31 PM, Frank Taylor pace...@madebypaceaux.com wrote: So far I've only had to really use the :nth-type selectors for tables, and for creating some demos on layouts. When it comes to tables, I'd created an html table-maker that optionally generates helper classes.

Re: [css-d] CSS3 Selectors

2013-06-12 Thread Frank Taylor
In your exact use case,I've solved the problem by using the adjacent sibling selector. More than three items and I consider things a little too messy; I'll revert to JS or helper classes for more than three items: style .wrap div{width: 32%;margin-right:2%;float:left} .wrap div + div +

Re: [css-d] CSS3 Selectors

2013-06-12 Thread Tom Livingston
On Wed, Jun 12, 2013 at 4:50 PM, Frank Taylor pace...@madebypaceaux.com wrote: In your exact use case,I've solved the problem by using the adjacent sibling selector. More than three items and I consider things a little too messy; I'll revert to JS or helper classes for more than three

Re: [css-d] CSS3 Selectors

2013-06-12 Thread Frank Taylor
Your one and only caveat is IE7: if there are HTML comments between the divs, then the adjacent sibling selector doesn't work. In the one case where our CMS was kicking out comments, I reverted to the non-adjacent selector: .wrap div ~ div ~ div {margin-right:0;} Mind you, if you're

[css-d] css3 selectors

2009-03-26 Thread Climis, Tim
I'm just curious, is there a css3 selector for previous siblings? And if there is, how widely supported is it? It'd be useful for styling paragraphs that come before (introducing) lists for instance. ---Tim Climis Computer Coordinator International Services

Re: [css-d] css3 selectors

2009-03-26 Thread Nick Fitzsimons
On Thu, March 26, 2009 1:21 pm, Climis, Tim wrote: I'm just curious, is there a css3 selector for previous siblings? And if there is, how widely supported is it? It'd be useful for styling paragraphs that come before (introducing) lists for instance. No, but you could achieve the same

Re: [css-d] css3 selectors

2009-03-26 Thread Mauricio (Maujor) Samy Silva
I'm just curious, is there a css3 selector for previous siblings? And if there is, how widely supported is it? --- Yes! There is. Sintax is: ul ~ p {...} matches p elements that comes

Re: [css-d] css3 selectors

2009-03-26 Thread Mauricio (Maujor) Samy Silva
Ops! My fault on previous email: Sintax is: ul ~ p {...} matches p elements that comes AFTER ul elements. MaurĂ­cio __ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ

Re: [css-d] css3 selectors

2009-03-26 Thread Climis, Tim
you could achieve the same thing (for the example you give) using CSS2.1 adjacent-sibling selectors [1]: p + ul { font-style: italic; } From the spec: Adjacent sibling selectors have the following syntax: E1 + E2, where E2 is the subject of the selector. The selector matches if E1

Re: [css-d] css3 selectors

2009-03-26 Thread Nick Fitzsimons
On Thu, March 26, 2009 2:03 pm, Climis, Tim wrote: Unless I'm misreading the spec, that would match the ul and make my list text italicized, which isn't what I want. I want to match the p. DOH! Yes, I fail - sorry :-( Well, it is lunchtime... -- Nick Fitzsimons http://www.nickfitz.co.uk/

Re: [css-d] css3 selectors

2009-03-26 Thread Michael Stewart
On Mar 26, 2009, at 10:06 AM, Mauricio ((Maujor)) Samy Silva wrote: I'm just curious, is there a css3 selector for previous siblings? And if there is, how widely supported is it? --

Re: [css-d] css3 selectors

2009-03-26 Thread Philippe Wittenbergh
On Mar 26, 2009, at 10:21 PM, Climis, Tim wrote: I'm just curious, is there a css3 selector for previous siblings? And if there is, how widely supported is it? It'd be useful for styling paragraphs that come before (introducing) lists for instance. Nope, nothing like that exists.

Re: [css-d] css3 selectors

2009-03-26 Thread Alan Gresley
Climis, Tim wrote: pThese are the things you need to bring:/p ul liBananas/li liPie/li /ul Unless I'm misreading the spec, that would match the ul and make my list text italicized, which isn't what I want. I want to match the p. Something like E1 + E2, where E1 is the subject of

Re: [css-d] css3 selectors

2009-03-26 Thread Climis, Tim
Ops! My fault on previous email: Sintax is: ul ~ p {...} matches p elements that comes AFTER ul elements. Yeah, my testing had just discovered that. :( Digging into the spec to see what was up, it looks like there's not a selector for what I want. Maybe because it would need a second

Re: [css-d] css3 selectors

2009-03-26 Thread Sarah Atkinson
ul ~ p {...} matches p elements that comes AFTER ul elements. The ~ matches all the p elements after a ul element. The + matches a p element immediately after a ul element. What about doing it backwards then put a class on the p and target the following ul

Re: [css-d] css3 selectors

2009-03-26 Thread Bill Brown
Climis, Tim wrote: I'm just curious, is there a css3 selector for previous siblings? And if there is, how widely supported is it? It'd be useful for styling paragraphs that come before (introducing) lists for instance. None exists, but you could use jQuery to do it: style type='text/css'

Re: [css-d] css3 selectors

2009-03-26 Thread Climis, Tim
What about doing it backwards then put a class on the p and target the following ul What I'm going for is to take the bottom margin off of a paragraph preceding a list. I don't need the list to be styled any differently, so there's no reason to target it at all. Here's a list: * Something *

Re: [css-d] css3 selectors

2009-03-26 Thread Atkinson, Sarah
You should use h* elements instead of p elements for any kind of header. You might then not need to specify any classes and it's more semantically correct What I'm going for is to take the bottom margin off of a paragraph preceding a list. I don't need the list to be styled any

Re: [css-d] css3 selectors

2009-03-26 Thread Scott Mueller
You should use h* elements instead of p elements for any kind of header. You might then not need to specify any classes and it's more semantically correct Sent from my iPhone On Mar 26, 2009, at 9:21 AM, Climis, Tim tcli...@indiana.edu wrote: What about doing it backwards then put a class

Re: [css-d] css3 selectors

2009-03-26 Thread Climis, Tim
Scott has a valid point here. Maybe this is the way you should be doing it. Also is it possible to make up ones own elements? That's sorta what XML is right? If you could do that then you can style it just like a p or h1 tag. He does. And I may do that. I'm not using h6 for anything on this

Re: [css-d] css3 selectors

2009-03-26 Thread coll...@sullivanlehdesigns.com
What I'm going for is to take the bottom margin off of a paragraph preceding a list. I don't need the list to be styled any differently, so there's no reason to target it at all. Here's a list: * Something * Something else Instead of: Here's a list: *something *something else

Re: [css-d] css3 selectors

2009-03-26 Thread David Hucklesby
Climis, Tim wrote: What about doing it backwards then put a class on the p and target the following ul What I'm going for is to take the bottom margin off of a paragraph preceding a list. I don't need the list to be styled any differently, so there's no reason to target it at all.

Re: [css-d] css3 selectors

2009-03-26 Thread Climis, Tim
How about *adding* a negative top margin to the UL? viz: An interesting idea that I had not thought of. It would work though. ---Tim __ css-discuss [cs...@lists.css-discuss.org]

Re: [css-d] css3 selectors

2009-03-26 Thread Kathy Wheeler
On 27/03/2009, at 4:26 AM, Climis, Tim wrote: But there are a few things I wish for that would make even more semantic sense. A. lists contained in paragraphs, or B. a list header element (like thead or th) ullh/lh li/li /ul Perhaps a definition list could be styled to achieve what you

[css-d] CSS3 selectors to filter out content style

2009-01-28 Thread Dylan Wilbanks
Someone I know came to me with a problem: he wants his print stylesheet to not apply a style when a link contains an image. Here's some sample HTML to explain the problem: a id=anchor name=anchor/a pa href=http://flickr.com;img src=http://flickr.com/foo/picture-ID; //a/p pHere is an a

Re: [css-d] CSS3 selectors to filter out content style

2009-01-28 Thread Els
Dylan Wilbanks wrote: I thought that using the :not selector was the solution: a:not([href*=flickr]):before { content: [; color: #000; text-decoration: none; } a:not([href*=flickr]):after { content: attr(href) ] ; color: #000; text-decoration: none; } But

Re: [css-d] CSS3 selectors to filter out content style

2009-01-28 Thread David Hucklesby
On Wed, 28 Jan 2009 11:54:09 -0800, Dylan Wilbanks wrote: Someone I know came to me with a problem: he wants his print stylesheet to not apply a style when a link contains an image. [sample code stripped] The generated content appears around the example link AND the linked image when you