W3C home > Mailing lists > Public > www-style@w3.org > October 2011

Re: Selecting the parent of an element

From: Rudolph Gottesheim <r.gottesheim@loot.at>
Date: Fri, 07 Oct 2011 15:36:44 +0200
Message-ID: <4E8F006C.2030706@loot.at>
To: Brian Kardell <bkardell@gmail.com>
CC: Řyvind Stenhaug <oyvinds@opera.com>, www-style@w3.org
I haven't looked into Selectors 4 yet and so I didn't know about 
:matches(). Looking at the current spec, I doubt that that would do what 
I want.

Here's a snippet to help illustrate my intention:

<div class="form-row">
	<label for="email">E-Mail</label>
	<input type="email" name="email" id="email" />

I want to have a border/outline around the label AND the input element 
when the input is focused (which is quite a useful thing to do). With 
Selectors 3, there is no way to do that, as far as I know.

Am 07.10.2011 15:21, schrieb Brian Kardell:
> form =.form-row input:focus { outline: solid 1px #ccc; }
> Couldn't you write that as:
> form:matches(form .form-row input:focus) { outline: solid 1px #ccc; }
> On Oct 7, 2011 9:04 AM, "Řyvind Stenhaug" <oyvinds@opera.com
> <mailto:oyvinds@opera.com>> wrote:
Received on Friday, 7 October 2011 13:37:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:05 UTC