[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    cssRules [ref: Konqueror crash - cssRules?]
From:       Vadim Plessky <lucy-ples () mtu-net ! ru>
Date:       2001-09-24 13:05:44
[Download RAW message or body]

Hi David,

Referencing to my mail ,and your answer from 18.09.01 on KFM-devel -
here is some extra info from PPK.
Hope it will be useful.

Vadim

----------  Forwarded Message  ----------

Subject: Re: look at this - it's interesting what people think
Date: Mon, 24 Sep 2001 13:53:15 +0200
From: Peter-Paul Koch <ppk@framfab.nl>
To: Vadim Plessky <lucy-ples@mtu-net.ru>

>With a bit of info on what this should do, I can help fixing it ;)
>Are we supposed to copy the items from the style list into the
>cssrulelistimpl ?
>-----------------------------

cssRules is an array with all CSS rules from a single style sheet, so I
guess the answer is 'Yes'. (Then again, I know nothing about this kind of
programming).

For a short description of methods and properties, see my Change Style
Sheet page and the new (as yet unfinished) W3C DOM Compatibility Table
(http://www.xs4all.nl/~ppk/js/index.html?version5nieuw.html). Don't use the
select box script above in Konqueror! It uses cssRules.

*** Most important:

cssRules[].style accesses the style rules (cssRules[1].style.color="#00cc00")

cssRules[].selectorText accesses the selector text ('H2')

cssRules[].cssText gives the style declarations as a string

cssRules[].style.setProperty('color','#00cc00') does the same as style above

cssRules[].style.removeProperty('color') removes the color declaration from
the rule

*** Personal wish:

What I'd really REALLY like to see added is cssRules behaving as a
hash/NamedNodeList/whatever, so that

cssRules['H2']

accesses the H2 rule in the style sheet, whatever its index number may be.
This is not in the W3C specs but web developers are going to need it. And
as soon as  Konqueror supports it, we can start working on the ego of
Netscape and Microsoft...

Hope this helps,

ppk

-------------------------------------------------------

-- 

Vadim Plessky
http://kde2.newmail.ru  (English)
33 Window Decorations and 6 Widget Styles for KDE
http://kde2.newmail.ru/kde_themes.html
Do you have Arial font installed? Just test it!
http://kde2.newmail.ru/font_test_arial.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic