From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/74684 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.gnus.general Subject: Re: Cascading styles Date: Sun, 05 Dec 2010 14:14:42 +0100 Organization: Programmerer Ingebrigtsen Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1291554915 16979 80.91.229.12 (5 Dec 2010 13:15:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 5 Dec 2010 13:15:15 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M23040@lists.math.uh.edu Sun Dec 05 14:15:11 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PPEQn-0001TU-Co for ding-account@gmane.org; Sun, 05 Dec 2010 14:15:09 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1PPEQd-0004H2-Db; Sun, 05 Dec 2010 07:14:59 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PPEQc-0004Gt-Ew for ding@lists.math.uh.edu; Sun, 05 Dec 2010 07:14:58 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PPEQY-0000XW-5L for ding@lists.math.uh.edu; Sun, 05 Dec 2010 07:14:58 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1PPEQX-0007PJ-00 for ; Sun, 05 Dec 2010 14:14:53 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PPEQW-0001Km-VR for ding@gnus.org; Sun, 05 Dec 2010 14:14:53 +0100 Original-Received: from cm-84.215.34.171.getinternet.no ([84.215.34.171]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 05 Dec 2010 14:14:52 +0100 Original-Received: from larsi by cm-84.215.34.171.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 05 Dec 2010 14:14:52 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 40 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.215.34.171.getinternet.no Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEXFxbRhYlfl49Wlppb4 +PA3NzCBg3VyBxIiAAACSUlEQVQ4jU2UMY/bMAyFeXaQnTWsWdAZnZWo0BzkhO4alDmqEP7/n9BH 2umVCBxbX6hHPouhYnEvGy7hzE7GqZRQCulyWyvAPYQLsxtx01UD96ulBd9bdSOFkLYdfGWkl+0+ r605SVevAHuXm12LgSoppXEADXz7MwBEksjpG9wBLmt7DNG4FgrbP/D5am2kZGD7BiFAoj6JBM08 J4AQ7kWvaG99RKLMIi7SFI7wdOF1iRQTMpjpTTylF6+D5pReTvpKRD54W0fbzUCvwgpo8lOgOb9a rShqB43eMWdtGyArWBvNx3qSdoAhrSMjRQMpdwUi2l9zBhQhgXeA6AZMDoFt30AzmORY153gLXfL EIAx/gMVXf8DmiPyanuAKOiELcfIWSXWuucoELL6ELB8rVYBywHyAZjhN2tOexwg78V3HpmtiEUB XvIOhnDKqqDOZNoVBO6gNoBF0ArqBGCrfW2R1HIcnqE3xGxdfYMZ3s3xAFpVxfOsP9eIM6G49gbq fgw4BcoOGwD0OSU7GzvgtapG3YrHe5n02OOG1BuIGAh+/pg2HRQAdqnDi84PAOzxx4CKLwrwAcAJ o6jD6KHBS4J7ILpV8NPH6Q1gnPrKbCB8/tBptIwd9GpzG8LTxtQy1C6ob+XrCjDe4Dmrt9LdqdzG tAMVcdfPrDMkDNXLspVs/xEKYBASxGHhJ08GbpkVRKgY2H6P53aeMC6fBmhGf07BV5pzxnjK6LRM qPmsFU/ldLuM7HSoktASfJp87uxi/nWLmR96YvP4C64H88q79CEqAAAAAElFTkSuQmCC Mail-Copies-To: never X-Now-Playing: The Cure's _Faith (1)_: "The Funeral Party" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:q7BiWU4hxS6Td0ALdKXsqQ18zaw= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:74684 Archived-At: Julien Danjou writes: > I don't see why inheriting would not work with what you did propose. if > its shr-descend call adds style information to the dynamic variable > shr-stylesheet (and merge them of course), we're just having correct > inheritance. Yes, but that's special-casing the colour things. :-) If you have

foo

bar then only the top-level p should have a border, and the next one shouldn't. But it's kinda moot, since I don't think any of the properties we're interested in have this kinda of behaviour. > With: >

foo

bar

> > You start with the first style, render foo with background and > foreground. Then you got for bar via shr-descend, which changes color to > green, but merge with the previous dynamically bound shr-stylesheet, so > it still has background set to 'blue'. You render bar, exit 2 > shr-descend calls, and continue to render what else is in the document. Yes... except that we're setting the colour after rendering all the children today. So I think we'll have to have the inheritance as well as the non-overwriting colour property stuff to get it right. I'm not sure how selectors like p.foo > div > p { colour: red; } selectors fit in here. I suspect it doesn't. :-) I'll take a whack at implementing the inheritance thing, and we'll see how that goes... -- (domestic pets only, the antidote for overdose, milk.) larsi@gnus.org * Lars Magne Ingebrigtsen