Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"Everyone's head is a cheap movie show." -- Jeff G. Bone


devel / comp.infosystems.www.authoring.stylesheets / Re: Test substitution in content properrt?

SubjectAuthor
* Test substitution in content properrt?Stan Brown
`* Re: Test substitution in content properrt?Y Lee Coyote
 `* Re: Test substitution in content properrt?Stan Brown
  `- Re: Test substitution in content properrt?Y Lee Coyote

1
Test substitution in content properrt?

<MPG.3f9af905f99041669901e2@news.individual.net>

 copy mid

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

 copy link   Newsgroups: comp.infosystems.www.authoring.stylesheets
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news-2.dfn.de!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: the_stan...@fastmail.fm (Stan Brown)
Newsgroups: comp.infosystems.www.authoring.stylesheets
Subject: Test substitution in content properrt?
Date: Thu, 19 Oct 2023 09:28:30 -0700
Organization: Oak Road Systems
Lines: 27
Message-ID: <MPG.3f9af905f99041669901e2@news.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net QUfxpE2wnndaOWzODDoLpQaTzCU1F9pwJIhDi7bWXseDwnYMsc
Cancel-Lock: sha1:PhBitexNnjsL+BueNzB4gVWUpXI= sha256:0LvJpacma0H2PBqBKYzJHgpSTwFltRRRnC9QddAay/k=
User-Agent: MicroPlanet-Gravity/3.0.11 (GRC)
 by: Stan Brown - Thu, 19 Oct 2023 16:28 UTC

I have the following in my CSS to display the URLs of
some links when the web document is printed:

@media print { a.showURL:after
{ content:" [URL " attr(href) "]"; }
}

That works fine, except that if a long URL happens to
occur midway on a line, it gets moved to the next line,
leaving a short line.

What I'd like to do is insert a zero-width space
&#x200b; after every slash except the initial https://.
I haven't been able to find a CSS way to do that, but I
thought it was worth asking in case I missed something.

Or is there some other way to accomplish this? I
suppose I could use attr(title) instead of attr(href)
and put the URL-with-ZWSPs in the title attribute, but
that seems pretty clunky and will look ugly if a person
reading on screen happens to hover over the link.

--
Stan Brown, Tehachapi, California, USA

https://BrownMath.com/

Re: Test substitution in content properrt?

<1023ji1j0v2hrft76blcb76vflm09iakn9@4ax.com>

 copy mid

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

 copy link   Newsgroups: comp.infosystems.www.authoring.stylesheets
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!3.us.feeder.erje.net!feeder.erje.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx06.iad.POSTED!not-for-mail
From: See.sign...@mail.com (Y Lee Coyote)
Newsgroups: comp.infosystems.www.authoring.stylesheets
Subject: Re: Test substitution in content properrt?
Reply-To: YLeeCoyote@mail.com
Message-ID: <1023ji1j0v2hrft76blcb76vflm09iakn9@4ax.com>
References: <MPG.3f9af905f99041669901e2@news.individual.net>
X-Newsreader: Forte Agent 5.00/32.1171
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 41
X-Complaints-To: abuse@easynews.com
Organization: Easynews - www.easynews.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Thu, 19 Oct 2023 15:50:56 -0400
X-Received-Bytes: 2074
 by: Y Lee Coyote - Thu, 19 Oct 2023 19:50 UTC

On Thu, 19 Oct 2023 09:28:30 -0700, Stan Brown <the_stan_brown@fastmail.fm>
wrote in <MPG.3f9af905f99041669901e2@news.individual.net>:

>I have the following in my CSS to display the URLs of
>some links when the web document is printed:
>
>@media print { a.showURL:after
>{ content:" [URL " attr(href) "]"; }
>}
>
>That works fine, except that if a long URL happens to
>occur midway on a line, it gets moved to the next line,
>leaving a short line.
>
>What I'd like to do is insert a zero-width space
>&#x200b; after every slash except the initial https://.
>I haven't been able to find a CSS way to do that, but I
>thought it was worth asking in case I missed something.
>
>Or is there some other way to accomplish this?
Yes. Use js
{ content:" [URL "
attr(href).replace(/\//g,"/&#x200b;").replace(/\/&#x200b;\/&#x200b;/,"//")
"]"; }
>}

> I
>suppose I could use attr(title) instead of attr(href)
>and put the URL-with-ZWSPs in the title attribute, but
>that seems pretty clunky and will look ugly if a person
>reading on screen happens to hover over the link.

Y.

Valid return address is <YLeeCoyote (at) juno.com>
(Posting address is for the spammers)

See my stories at: https://yleecoyote.asslr.org/
Status page at: https://yleecoyote.weebly.com/

P & E

Re: Test substitution in content properrt?

<MPG.3f9b34ec26cf0cf09901e3@news.individual.net>

 copy mid

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

 copy link   Newsgroups: comp.infosystems.www.authoring.stylesheets
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: the_stan...@fastmail.fm (Stan Brown)
Newsgroups: comp.infosystems.www.authoring.stylesheets
Subject: Re: Test substitution in content properrt?
Date: Thu, 19 Oct 2023 13:44:02 -0700
Organization: Oak Road Systems
Lines: 34
Message-ID: <MPG.3f9b34ec26cf0cf09901e3@news.individual.net>
References: <MPG.3f9af905f99041669901e2@news.individual.net> <1023ji1j0v2hrft76blcb76vflm09iakn9@4ax.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net EZ7uE1gsBYFiA7pD9yENiAzZqmKZHizZYwgjhZh4RuHZ5bqTnH
Cancel-Lock: sha1:pFzMnXzJ1Qf/kFdVYFl4OEwVeoY= sha256:8KUj86C0RjjWEfd77d6WDaqArHNvAXg9TJxuBwrE6iI=
User-Agent: MicroPlanet-Gravity/3.0.11 (GRC)
 by: Stan Brown - Thu, 19 Oct 2023 20:44 UTC

On Thu, 19 Oct 2023 15:50:56 -0400, Y Lee Coyote wrote:
>
> On Thu, 19 Oct 2023 09:28:30 -0700, Stan Brown <the_stan_brown@fastmail.fm>
> wrote in <MPG.3f9af905f99041669901e2@news.individual.net>:
>
> >I have the following in my CSS to display the URLs of
> >some links when the web document is printed:
> >
> >@media print { a.showURL:after
> >{ content:" [URL " attr(href) "]"; }
> >}
> >
> >That works fine, except that if a long URL happens to
> >occur midway on a line, it gets moved to the next line,
> >leaving a short line.
> >
> >What I'd like to do is insert a zero-width space
> >&#x200b; after every slash except the initial https://.
> >I haven't been able to find a CSS way to do that, but I
> >thought it was worth asking in case I missed something.
> >
> >Or is there some other way to accomplish this?
> Yes. Use js
> { content:" [URL "
> attr(href).replace(/\//g,"/&#x200b;").replace(/\/&#x200b;\/&#x200b;/,"//")
> "]"; }
> >}

Thanks for replying, but the W3c css validator threw four "CSS parse
error"s on that line.

--
Stan Brown, Tehachapi, California, USA
https://BrownMath.com/

Re: Test substitution in content properrt?

<ri73jid74l1n2sb5i2rq73ur4v0ch60bp6@4ax.com>

 copy mid

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

 copy link   Newsgroups: comp.infosystems.www.authoring.stylesheets
Path: i2pn2.org!i2pn.org!news.bbs.nz!weretis.net!feeder8.news.weretis.net!news.neodome.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer01.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx10.iad.POSTED!not-for-mail
From: See.sign...@mail.com (Y Lee Coyote)
Newsgroups: comp.infosystems.www.authoring.stylesheets
Subject: Re: Test substitution in content properrt?
Reply-To: YLeeCoyote@mail.com
Message-ID: <ri73jid74l1n2sb5i2rq73ur4v0ch60bp6@4ax.com>
References: <MPG.3f9af905f99041669901e2@news.individual.net> <1023ji1j0v2hrft76blcb76vflm09iakn9@4ax.com> <MPG.3f9b34ec26cf0cf09901e3@news.individual.net>
X-Newsreader: Forte Agent 5.00/32.1171
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 60
X-Complaints-To: abuse@easynews.com
Organization: Easynews - www.easynews.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Thu, 19 Oct 2023 17:33:59 -0400
X-Received-Bytes: 2825
 by: Y Lee Coyote - Thu, 19 Oct 2023 21:33 UTC

On Thu, 19 Oct 2023 13:44:02 -0700, Stan Brown <the_stan_brown@fastmail.fm>
wrote in <MPG.3f9b34ec26cf0cf09901e3@news.individual.net>:

>On Thu, 19 Oct 2023 15:50:56 -0400, Y Lee Coyote wrote:
>>
>> On Thu, 19 Oct 2023 09:28:30 -0700, Stan Brown <the_stan_brown@fastmail.fm>
>> wrote in <MPG.3f9af905f99041669901e2@news.individual.net>:
>>
>> >I have the following in my CSS to display the URLs of
>> >some links when the web document is printed:
>> >
>> >@media print { a.showURL:after
>> >{ content:" [URL " attr(href) "]"; }
>> >}
>> >
>> >That works fine, except that if a long URL happens to
>> >occur midway on a line, it gets moved to the next line,
>> >leaving a short line.
>> >
>> >What I'd like to do is insert a zero-width space
>> >&#x200b; after every slash except the initial https://.
>> >I haven't been able to find a CSS way to do that, but I
>> >thought it was worth asking in case I missed something.
>> >
>> >Or is there some other way to accomplish this?
>> Yes. Use js
>> { content:" [URL "
>> attr(href).replace(/\//g,"/&#x200b;").replace(/\/&#x200b;\/&#x200b;/,"//")
>> "]"; }
>> >}
>
>Thanks for replying, but the W3c css validator threw four "CSS parse
>error"s on that line.

You have replace
attr(href)
with
attr(href).replace(/\//g,"/&#x200b;").replace(/\/&#x200b;\/&#x200b;/,"//")
executed in JaveScript environment.

I will guess something like
<script> var
qqqq=attr(href).replace(/\//g,"/&#x200b;").replace(/\/&#x200b;\/&#x200b;/,"//")
</script>
Then
@media print { a.showURL:after
{ content:" [URL " qqqq "]"; }
} but you must be sure that qqqq is known where it is used.

Y.

Valid return address is <YLeeCoyote (at) juno.com>
(Posting address is for the spammers)

See my stories at: https://yleecoyote.asslr.org/
Status page at: https://yleecoyote.weebly.com/

P & E

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor