Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #13133
| Message-ID | <1803366.4W3vaeNJFY@PointedEars.de> (permalink) |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Organization | PointedEars Software (PES) |
| Date | 2012-03-30 20:59 +0200 |
| Subject | Re: Browser Default Colors |
| Newsgroups | comp.lang.javascript |
| References | <q0l9n79p2tteamk95li9013sa1scbsothl@4ax.com> <XnsA0265A04617ACeejj99@194.109.133.133> <chtbn71a9ph05nmetapkdul4jl58ho3ue2@4ax.com> |
| Followup-To | comp.lang.javascript |
Followups directed to: comp.lang.javascript
Dr.Kral@nyc.rr.com wrote:
> On 30 Mar 2012 06:50:56 GMT, "Evertjan." <exjxw.hannivoort@interxnl.net>
> wrote in <XnsA0265A04617ACeejj99@194.109.133.133>:
>> Dr.Kral wrote on 29 mrt 2012 in comp.lang.javascript:
See, most of that is what I referred to in my other answer as unnecessary
and unwanted (because distracting) duplication of message header field
values in my other answer.
>>> I would like to get the default colors used by a browser using
>>> ECMAScript from within the displayed page.
>> In fact you are asking for DOM-functions, not for ECMA-script functions.
There are no "DOM-functions" and there is no "ECMA-script". There are DOM
(API) methods and there is ECMAScript. The W3C DOM Specification defines an
ECMAScript language binding for interface attributes and methods, and DOM
implementations allow an ECMAScript implementation to make use of those.
You are obviously not good at splitting hairs, so please don't.
> Without splitting hairs, I'm asking for the script function that retrieves
> a parameter from the browser (background color) in a similar way to
> getting, say, window height and screen width. There must be some default
> style sheet (or equivalent) that has all the defaults parameters.
There is, but it should be of no concern to script authors which is why they
cannot access it in all cases. If you are interested in the default value
as a developer, use a CSS inspector application (as included in all recent
Web browsers). But never rely on it.
>> I cannot imagine why you would need to know the browser default colours
>> as a web-page programmer. As a programmer you should set those colours
>> yourself if you concerned if the view will be as you wish.
>
> One simple example -- swap color and background color in a section. Can't
> do it without knowing both for transparent text is not readable.
AISB, if the body text color was declared, the body background color should
be declared as well (and vice-versa). If not, that is an authoring error as
the document is running the risk of being unreadable. So you can always
know the background color and there is no real problem switching background
and foreground color, regardless if this would ever be necessary or
advisable.
<http://www.w3.org/QA/Tips/color>
>> Methinks that information, especially the dynamic colours of the <a>, are
>> or should be hidden from the script under normal security-settings, as it
>> is an improper way to measure the external links that are clicked.
>
> Note I was asking about the default colors for link:visited not for a
> visited link element.
AFAIK the `:visited' pseudo-class does not apply to `link' elements.
<http://www.w3.org/TR/CSS2/selector.html#link-pseudo-classes>
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Browser Default Colors Dr.Kral@nyc.rr.com - 2012-03-29 17:30 -0400
Re: Browser Default Colors "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-03-30 06:50 +0000
Re: Browser Default Colors Dr.Kral@nyc.rr.com - 2012-03-30 14:08 -0400
Re: Browser Default Colors Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-03-30 20:59 +0200
Re: Browser Default Colors Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-03-30 20:46 +0200
Re: Browser Default Colors John G Harris <john@nospam.demon.co.uk> - 2012-03-31 11:49 +0100
Re: Browser Default Colors "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-03-31 11:49 +0000
Re: Browser Default Colors David Mark <dmark.cinsoft@gmail.com> - 2012-03-31 04:01 -0700
Re: Browser Default Colors Dr.Kral@nyc.rr.com - 2012-03-31 08:47 -0400
Re: Browser Default Colors David Mark <dmark.cinsoft@gmail.com> - 2012-03-29 18:22 -0700
csiph-web