W3C home > Mailing lists > Public > www-style@w3.org > March 2006

Re: CSS Selectors: How to style non-styleable?

From: Mihai Sucan <mihai.sucan@gmail.com>
Date: Sat, 11 Mar 2006 12:35:29 +0200
To: "Boris Zbarsky" <bzbarsky@mit.edu>
Cc: "Andrew Fedoniouk" <news@terrainformatica.com>, www-style@w3.org
Message-ID: <op.s58vpfa5mcpsjg@localhost.localdomain>

Le Fri, 10 Mar 2006 23:28:21 +0200, Boris Zbarsky <bzbarsky@mit.edu> a  

> Mihai Sucan wrote:
>> 1. Provide DOM elements for scrollbars and for all "hidden" elements.
>>  document.getElementById('scrollable-element').scrollbar:
> What happens if I appendChild this element somewhere else in my  
> document?  Does the scrollbar break?

No, because element.scrollbar is not a DOMNode. It's just a DOM object.

Think of it like having something from JS:

document.getElementById("scrollable-element").scrollbar = {
	top: function () { [code] },
	bottom: function () { [code] },

Same goes for scollbar.upElement/downElement/etc.

> What if I change its style to display:none?

This is not an element you can reference via CSS.

> What if I set random attributes on it?

scrollbar.setAttribute() is not available, and setting  
.scrollbar.whatever.random has no effect, just like setting  
document.something.random has no effect. Yet .scrollbar could be made  

ROBO Design - We bring you the future
Received on Saturday, 11 March 2006 10:34:46 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:23 UTC