Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

It has just been discovered that research causes cancer in rats.


devel / comp.infosystems.www.authoring.stylesheets / Select last

SubjectAuthor
* Select lastAndrew Poulos
+- Re: Select lastThomas 'PointedEars' Lahn
`- Re: Select lastJames Kirk

1
Select last

<ofednRaSktRCEAH9nZ2dnUU7-I_NnZ2d@westnet.com.au>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=83&group=comp.infosystems.www.authoring.stylesheets#83

  copy link   Newsgroups: comp.infosystems.www.authoring.stylesheets
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!buffer2.nntp.dca1.giganews.com!nntp.westnet.com.au!news.westnet.com.au.POSTED!not-for-mail
NNTP-Posting-Date: Wed, 12 May 2021 21:24:31 -0500
Newsgroups: comp.infosystems.www.authoring.stylesheets
X-Mozilla-News-Host: news://news.iinet.net.au:119
From: ap_p...@hotmail.com (Andrew Poulos)
Subject: Select last
Date: Thu, 13 May 2021 12:24:29 +1000
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-AU
Content-Transfer-Encoding: 7bit
Message-ID: <ofednRaSktRCEAH9nZ2dnUU7-I_NnZ2d@westnet.com.au>
Lines: 15
X-Usenet-Provider: http://www.giganews.com
NNTP-Posting-Host: 14.202.227.31
X-Trace: sv3-To2YpVnMYNXOuJ3bBciheK/RAI3tc1Pnn7tddjELSK1hW8JosA9HmJe5KJyDJHXXkZ2nK8Kk6j4+eEA!EIXNj7l+wH+A35VjubgNe2UOA1IDEQV0vTsdOCtowTyQ55J5eNC35Mklkb0mxvnhbXRxvjeoUdl9!8naa4pkEFwa27kVR9VrD
X-Complaints-To: abuse@westnet.com.au
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 1647
 by: Andrew Poulos - Thu, 13 May 2021 02:24 UTC

I have a number of BUTTON elements. One of the elements will always have
a '.last-btn' class (and it may well be the last element). How can I
select the "last" element but never the one with 'last-btn'?

For example, if the elements were in this order
b-1, b-2, b-3, b-last
or in this order
b-1, b-last, b-2, b-3
b-3 would be selected.

These fail :-(
div > button:last-child, button:not(.last-btn)
div > button:last-child, div > button:not(.last-btn)

Andrew Poulos

Re: Select last

<4338967.LvFx2qVVIh@PointedEars.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=84&group=comp.infosystems.www.authoring.stylesheets#84

  copy link   Newsgroups: comp.infosystems.www.authoring.stylesheets
Path: i2pn2.org!i2pn.org!aioe.org!news.mb-net.net!open-news-network.org!.POSTED.178.197.213.27!not-for-mail
From: PointedE...@web.de (Thomas 'PointedEars' Lahn)
Newsgroups: comp.infosystems.www.authoring.stylesheets
Subject: Re: Select last
Date: Thu, 13 May 2021 14:00:03 +0200
Organization: PointedEars Software (PES)
Lines: 33
Message-ID: <4338967.LvFx2qVVIh@PointedEars.de>
References: <ofednRaSktRCEAH9nZ2dnUU7-I_NnZ2d@westnet.com.au>
Reply-To: Thomas 'PointedEars' Lahn <cljs@PointedEars.de>
Mime-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7Bit
Injection-Info: gwaiyur.mb-net.net; posting-host="178.197.213.27";
logging-data="28511"; mail-complaints-to="abuse@open-news-network.org"
User-Agent: KNode/4.14.10
Cancel-Lock: sha1:MEkh6hEN1pKcicjlEXl0bW0dFTc=
X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?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qrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg==
 by: Thomas 'Pointed - Thu, 13 May 2021 12:00 UTC

Andrew Poulos wrote:

> I have a number of BUTTON elements. One of the elements will always have
> a '.last-btn' class (and it may well be the last element). How can I
> select the "last" element but never the one with 'last-btn'?
>
> For example, if the elements were in this order
> b-1, b-2, b-3, b-last
> or in this order
> b-1, b-last, b-2, b-3
> b-3 would be selected.
>
> These fail :-(
> div > button:last-child, button:not(.last-btn)
> div > button:last-child, div > button:not(.last-btn)

The comma between selectors acts like an OR operator.

Use

div > button:last-child:not(.last-btn)

instead.

However, you should avoid formatting based on element type and position, and
use classes instead.

See also: <https://cssguidelin.es/>

--
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

Re: Select last

<4d02109f-20593491-134f0bb8.tiberius@james.kirk.invalid>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=85&group=comp.infosystems.www.authoring.stylesheets#85

  copy link   Newsgroups: comp.infosystems.www.authoring.stylesheets
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!james.kirk.invalid!.POSTED!not-for-mail
From: noneya.i...@gmail.com (James Kirk)
Newsgroups: comp.infosystems.www.authoring.stylesheets
Subject: Re: Select last
Date: Thu, 13 May 2021 14:59:33 -0400
Organization: Time Travel Tracing
Lines: 25
Message-ID: <4d02109f-20593491-134f0bb8.tiberius@james.kirk.invalid>
References: <ofednRaSktRCEAH9nZ2dnUU7-I_NnZ2d@westnet.com.au>
Reply-To: ": James Kirk" <noneya.invalid+knobknocker@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: james.kirk.invalid; posting-host="7320fe00bdb63c8e587927c3e276a2e9";
logging-data="2759"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+C143zbwfvJfTtcbf+u37oRFnsL5vDgsg="
User-Agent: Unicorn named Ellie
Cancel-Lock: sha1:cQ7QLiBvy0LHFKhvBpS3t7201G8=
X-Rot13: This message MAY contains rot13 encoded text that sensitive people
may find offense, decode at your own peril.
In-Reply-To: <ofednRaSktRCEAH9nZ2dnUU7-I_NnZ2d@westnet.com.au>
X-Newsreader: Microsoft Windows Dead Mail Original Imitation Prototype
Content-Language: en-US
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QIHFgQpyK6L9AAAAEJQTFRFAAAAQAAAQEAAQEBAQECAgEBAgECAgIBAgICAgIC/gL+/v4BAv4CAv4C/v7+Av7+/v7//v////7+A/7+///+/////CTpitwAAAAF0Uk5TAEDm2GYAAAABYktHRBXl2PmjAAAB6klEQVRIx61Vi3KEIAz0pJZYUwIi//+r3QT78sTKTDM3N6e3y+5iIsPwT+UcdeHJOSd9Ao6kVyB2CqQkfQKpSI+AS6lDQh2VDoIzR6jYQVCBuymo7tH9EF+OUrwnAfxLFSjp/aajuZTbnujbUYop/dWz7P1kDyFWS4lYLuETyrs5VUKMSTyHthvFe/ZwFD8tRQ68SNvOxFlGh8hFl48oCoF9aOC9l23jB6n5GMHBR1gZfI7nvG2bf0hUL2YLNCWwf3Ilnip+Q2cX86+G8FM9MU/PgcmHDIaMZG6wflGKegLhyZQn4oxCBKlxTaHGBmHxz45ECRkRFFpX1+9UCQdPzHikRtBRiD8rzacEQjbFh5HKjixSzJco/kgQomyM5THvAoKFxXaLzgj40wj2FNSI2NW7pdbM/ritlbBOLu3rm0EnshOO3cHIAEZAIwG949ewvOqFX467ahIIsfJIltN2bF1XngQa/qxhWQkBEUTXzJWAGzCFKeKzaVDGpJllNwR84IlEiM/nIWRG54ERKrwSIDE3Jg57O7ooiVetYIX5o9gca2KcOzAUdnRtbEhcvMKAp/CrriTsoCKM2JenPAwzbr5dKWgYxUr+PoEvCCfq1DyBIf4iPYc8NQ5naUlQeynqJLRf9Z2E4cb58QHWYi4v2VmiigAAAABJRU5ErkJggg==
X-Operating-System: Windows 3.0
X-Content-Warning: The content of this message MAY contain controversial
topics and SHOULD NOT be viewed by: sensitive individuals, malcontents,
individuals under the age of 120, troglodytes, judgmental individuals,
opinionated individuals or multi-cellular organisms.
X-CodePen: https://codepen.io/noneyainvalid/embed/zYZqqOM/?theme-id=modal
 by: James Kirk - Thu, 13 May 2021 18:59 UTC

In Message: <ofednRaSktRCEAH9nZ2dnUU7-I_NnZ2d@westnet.com.au>
Andrew Poulos <ap_prog@hotmail.com> wrote:

> I have a number of BUTTON elements. One of the elements will always
> have a '.last-btn' class (and it may well be the last element). How
> can I select the "last" element but never the one with 'last-btn'?

> For example, if the elements were in this order
> b-1, b-2, b-3, b-last
> or in this order
> b-1, b-last, b-2, b-3
> b-3 would be selected.

Is your intent to select b-3 in both examples?

https://codepen.io/noneyainvalid/embed/zYZqqOM/?theme-id=modal

[snip]

If not then the example Thomas provided should do what you want.

--
Jš•’š•žš•–š•¤ š•‚š•šš•£š•œ

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor