Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #33692 > unrolled thread
| Started by | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| First post | 2017-08-07 16:39 +1000 |
| Last post | 2017-08-07 22:31 +0200 |
| Articles | 20 — 6 participants |
Back to article view | Back to comp.lang.javascript
Disabled stylesheet still used Andrew Poulos <ap_prog@hotmail.com> - 2017-08-07 16:39 +1000
Re: Disabled stylesheet still used Silvio <silvio@internet.com> - 2017-08-07 09:11 +0200
Re: Disabled stylesheet still used Julio Di Egidio <julio@diegidio.name> - 2017-08-07 02:10 -0700
Re: Disabled stylesheet still used Andrew Poulos <ap_prog@hotmail.com> - 2017-08-07 19:35 +1000
Re: Disabled stylesheet still used Julio Di Egidio <julio@diegidio.name> - 2017-08-07 03:41 -0700
Re: Disabled stylesheet still used Julio Di Egidio <julio@diegidio.name> - 2017-08-07 20:42 -0700
Re: Disabled stylesheet still used Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-08-07 22:30 +0200
Re: Disabled stylesheet still used Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-08-07 22:53 +0200
Re: Disabled stylesheet still used Andrew Poulos <ap_prog@hotmail.com> - 2017-08-08 12:31 +1000
Re: Disabled stylesheet still used Julio Di Egidio <julio@diegidio.name> - 2017-08-07 20:48 -0700
Re: Disabled stylesheet still used James Kirk <noneya.invalid@gmail.com> - 2017-08-07 14:43 -0400
Re: Disabled stylesheet still used James Kirk <noneya.invalid@gmail.com> - 2017-08-07 19:50 -0400
Re: Disabled stylesheet still used Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-08-08 06:40 +0200
OT standard whining from PointedEars nothing useful here James Kirk <noneya.invalid@gmail.com> - 2017-08-08 05:43 -0400
Re: Disabled stylesheet still used (was: OT standard whining from **** nothing useful here) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-08-08 13:03 +0200
Re: Disabled stylesheet still used JJ <jj4public@vfemail.net> - 2017-08-08 01:55 +0700
Re: Disabled stylesheet still used JJ <jj4public@vfemail.net> - 2017-08-08 01:58 +0700
Re: Disabled stylesheet still used Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-08-07 22:32 +0200
Re: Disabled stylesheet still used Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-08-07 21:37 +0200
Re: Disabled stylesheet still used Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-08-07 22:31 +0200
| From | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| Date | 2017-08-07 16:39 +1000 |
| Subject | Disabled stylesheet still used |
| Message-ID | <kZ6dnVj08fqglhXEnZ2dnUU7-X3NnZ2d@westnet.com.au> |
In a page head there are references to a number of stylesheets
<link id="black" type="text/css" rel="stylesheet" disabled href="black.css">
<link id="blue" type="text/css" rel="stylesheet" disabled href="blue.css">
<link id="green" type="text/css" rel="stylesheet" disabled
href="_green.css">
...
The js, which is called after the stylesheet references, in the page
enables one of the stylesheets, eg
document.getElementById("black").disabled = false;
On Chrome, IE, Edge and Brave (and on an iPad) the enabled stylesheet is
the one that is applied.
With Firefox the "last" stylesheet is always applied irrespective of
which stylesheet is enabled. How can I get Firefox to only apply the
enabled stylesheet?
This implies that what I'm doing should work
<https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet/disabled>
Andrew Poulos
[toc] | [next] | [standalone]
| From | Silvio <silvio@internet.com> |
|---|---|
| Date | 2017-08-07 09:11 +0200 |
| Message-ID | <598812b8$0$1762$e4fe514c@newszilla.xs4all.nl> |
| In reply to | #33692 |
On 07-08-17 08:39, Andrew Poulos wrote:
> In a page head there are references to a number of stylesheets
>
> <link id="black" type="text/css" rel="stylesheet" disabled
> href="black.css">
> <link id="blue" type="text/css" rel="stylesheet" disabled href="blue.css">
> <link id="green" type="text/css" rel="stylesheet" disabled
> href="_green.css">
> ...
>
> The js, which is called after the stylesheet references, in the page
> enables one of the stylesheets, eg
>
> document.getElementById("black").disabled = false;
>
> On Chrome, IE, Edge and Brave (and on an iPad) the enabled stylesheet is
> the one that is applied.
>
> With Firefox the "last" stylesheet is always applied irrespective of
> which stylesheet is enabled. How can I get Firefox to only apply the
> enabled stylesheet?
>
> This implies that what I'm doing should work
> <https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet/disabled>
>
> Andrew Poulos
No, it does not. The HTML spec does not specify a disabled attribute on
the <link/> element and therefore you should not use it.
Your source refers to using the disabled property on the DOM-element,
which is supported.
So to be compliant you should set a disabled property for all links,
remove the links that should not be used or only insert the link that
should be used (which makes the most sense to me).
Silvio
[toc] | [prev] | [next] | [standalone]
| From | Julio Di Egidio <julio@diegidio.name> |
|---|---|
| Date | 2017-08-07 02:10 -0700 |
| Message-ID | <916b1ac8-cc6b-460f-84f1-99a0b482a053@googlegroups.com> |
| In reply to | #33692 |
On Monday, August 7, 2017 at 8:40:13 AM UTC+2, Andrew Poulos wrote:
> In a page head there are references to a number of stylesheets
>
> <link id="black" type="text/css" rel="stylesheet" disabled href="black.css">
> <link id="blue" type="text/css" rel="stylesheet" disabled href="blue.css">
> <link id="green" type="text/css" rel="stylesheet" disabled
> href="_green.css">
> ...
>
> The js, which is called after the stylesheet references, in the page
> enables one of the stylesheets, eg
>
> document.getElementById("black").disabled = false;
Try this:
document.getElementById("black").removeAttribute("disabled");
If not even that works, you'll have to think of another approach.
> On Chrome, IE, Edge and Brave (and on an iPad) the enabled stylesheet is
> the one that is applied.
>
> With Firefox the "last" stylesheet is always applied irrespective of
> which stylesheet is enabled. How can I get Firefox to only apply the
> enabled stylesheet?
>
> This implies that what I'm doing should work
> <https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet/disabled>
Yes, it should, but support for these "fringe" features is not guaranteed.
HTH,
Julio
[toc] | [prev] | [next] | [standalone]
| From | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| Date | 2017-08-07 19:35 +1000 |
| Message-ID | <Ir6dncB58cHaqRXEnZ2dnUU7-WvNnZ2d@westnet.com.au> |
| In reply to | #33694 |
On 7/08/2017 7:10 PM, Julio Di Egidio wrote:
> On Monday, August 7, 2017 at 8:40:13 AM UTC+2, Andrew Poulos wrote:
>> In a page head there are references to a number of stylesheets
>>
>> <link id="black" type="text/css" rel="stylesheet" disabled href="black.css">
>> <link id="blue" type="text/css" rel="stylesheet" disabled href="blue.css">
>> <link id="green" type="text/css" rel="stylesheet" disabled
>> href="_green.css">
>> ...
>>
>> The js, which is called after the stylesheet references, in the page
>> enables one of the stylesheets, eg
>>
>> document.getElementById("black").disabled = false;
>
> Try this:
>
> document.getElementById("black").removeAttribute("disabled");
>
> If not even that works, you'll have to think of another approach.
The problem is that the "disabled" attribute doesn't appear to be
honoured by Firefox so changing/removing its value will have no effect.
>> On Chrome, IE, Edge and Brave (and on an iPad) the enabled stylesheet is
>> the one that is applied.
>>
>> With Firefox the "last" stylesheet is always applied irrespective of
>> which stylesheet is enabled. How can I get Firefox to only apply the
>> enabled stylesheet?
>>
>> This implies that what I'm doing should work
>> <https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet/disabled>
>
> Yes, it should, but support for these "fringe" features is not guaranteed.
Ok, thanks. It looks like I'll need to look at doing something like
dynamically adding the required stylesheet instead.
Andrew Poulos
[toc] | [prev] | [next] | [standalone]
| From | Julio Di Egidio <julio@diegidio.name> |
|---|---|
| Date | 2017-08-07 03:41 -0700 |
| Message-ID | <a6db2b12-28bd-430a-ad24-aa3224dab292@googlegroups.com> |
| In reply to | #33695 |
On Monday, August 7, 2017 at 11:35:17 AM UTC+2, Andrew Poulos wrote:
> On 7/08/2017 7:10 PM, Julio Di Egidio wrote:
> > On Monday, August 7, 2017 at 8:40:13 AM UTC+2, Andrew Poulos wrote:
<snip>
> >> The js, which is called after the stylesheet references, in the page
> >> enables one of the stylesheets, eg
> >>
> >> document.getElementById("black").disabled = false;
> >
> > Try this:
> >
> > document.getElementById("black").removeAttribute("disabled");
> >
> > If not even that works, you'll have to think of another approach.
>
> The problem is that the "disabled" attribute doesn't appear to be
> honoured by Firefox so changing/removing its value will have no effect.
I'd try it: setting it to false is not the same as removing it...
Julio
[toc] | [prev] | [next] | [standalone]
| From | Julio Di Egidio <julio@diegidio.name> |
|---|---|
| Date | 2017-08-07 20:42 -0700 |
| Message-ID | <096f073b-93f1-4db2-9114-5ee2bf6a378d@googlegroups.com> |
| In reply to | #33696 |
On Monday, August 7, 2017 at 12:42:00 PM UTC+2, Julio Di Egidio wrote:
> On Monday, August 7, 2017 at 11:35:17 AM UTC+2, Andrew Poulos wrote:
> > On 7/08/2017 7:10 PM, Julio Di Egidio wrote:
> > > On Monday, August 7, 2017 at 8:40:13 AM UTC+2, Andrew Poulos wrote:
> <snip>
> > >> The js, which is called after the stylesheet references, in the page
> > >> enables one of the stylesheets, eg
> > >>
> > >> document.getElementById("black").disabled = false;
> > >
> > > Try this:
> > >
> > > document.getElementById("black").removeAttribute("disabled");
> > >
> > > If not even that works, you'll have to think of another approach.
> >
> > The problem is that the "disabled" attribute doesn't appear to be
> > honoured by Firefox so changing/removing its value will have no effect.
>
> I'd try it: setting it to false is not the same as removing it...
That was an easy test and you owed me to quickly try it and report back:
that's why one helps (I mean the sane people), to keep learning...
Julio
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2017-08-07 22:30 +0200 |
| Message-ID | <4023794.cEBGB3zze1@PointedEars.de> |
| In reply to | #33695 |
Andrew Poulos wrote:
> On 7/08/2017 7:10 PM, Julio Di Egidio wrote:
>> On Monday, August 7, 2017 at 8:40:13 AM UTC+2, Andrew Poulos wrote:
>>> In a page head there are references to a number of stylesheets
>>>
>>> <link id="black" type="text/css" rel="stylesheet" disabled
>>> href="black.css"> <link id="blue" type="text/css" rel="stylesheet"
>>> disabled href="blue.css"> <link id="green" type="text/css"
>>> rel="stylesheet" disabled href="_green.css">
>>> ...
>>>
>>> The js, which is called after the stylesheet references, in the page
>>> enables one of the stylesheets, eg
>>>
>>> document.getElementById("black").disabled = false;
>>
>> Try this:
>>
>> document.getElementById("black").removeAttribute("disabled");
>>
>> If not even that works, you'll have to think of another approach.
>
> The problem is that the "disabled" attribute doesn't appear to be
> honoured by Firefox so changing/removing its value will have no effect.
The `disabled` property works for me regardless whether the `disabled`
attribute is present.
(As “JJ” has pointed out _correctly_,) if you run this code through the W3C
(Nu) Validator – *always* validate your markup before posting –, you will
find that the LINK element has no `disabled` *markup* attribute in HTML 4.01
(not even Transitional), and “currently” the `link` element has no disabled
*markup* attribute in HTML 5.x or WHATWG HTML.
However, the `HTMLLinkElement` DOM interface of HTML5(.0) has a `disabled`
*interface* attribute that is implemented as a `disabled` *property* on
`link` element objects:
<https://www.w3.org/TR/2014/REC-html5-20141028/document-metadata.html#the-link-element>
Curiously, WHATWG HTML of 2017-08-04 does not even specify the `disabled`
interface attribute on the `HTMLLinkElement` interface (neither does the
`LinkStyle` interface there):
<https://html.spec.whatwg.org/multipage/semantics.html#the-link-element>
This is reflected by HTML 5.1 also not specifying that attribute anymore:
<https://www.w3.org/TR/2016/REC-html51-20161101/document-metadata.html#the-link-element>
Given that, (IIRC) your reported interpretation of the `disabled` attribute
by Blink (Chrome, Brave), Trident (IE), EdgeHTML (Edge), and WebCore (Mobile
Safari on iPhone and iPad) as setting the `disabled` property of the element
object to `true`, must be considered proprietary behavior.
Because of the references in HTML 5.x and WHATWG HTML, one must assume that
the `disabled` property of `link` element objects is now implemented only
according to the `StyleSheet` interface of the CSS Object Model (CSSOM)
Specification, which is still a Working/Editor’s Draft:
<https://www.w3.org/TR/2016/WD-cssom-1-20160317/#the-stylesheet-interface>
<https://drafts.csswg.org/cssom/#the-stylesheet-interface> (2017-08-07)
>>> On Chrome, IE, Edge and Brave (and on an iPad) the enabled stylesheet is
>>> the one that is applied.
>>>
>>> With Firefox the "last" stylesheet is always applied irrespective of
>>> which stylesheet is enabled. How can I get Firefox to only apply the
>>> enabled stylesheet?
You could insert the `link` elements disabled with scripting except one,
then enable only the target one. You could also leave the `link` elements
as they are, trusting that it will not look too bad if they are all applied,
and the disable and enable them later. Either approach could lead to FOUC,
but I cannot think of better alternatives.
>>> This implies that what I'm doing should work
>>> <https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet/disabled>
>>
>> Yes, it should, but support for these "fringe" features is not
>> guaranteed.
This is not a “‘fringe’ feature”. The property must have been supported for
several years now, considering that I have been using the Web Developer
extension, which provides a UI to do that, for that long. (Currently there
is no information about it on <http://caniuse.com/>.)
> Ok, thanks. It looks like I'll need to look at doing something like
> dynamically adding the required stylesheet instead.
Or not listen to wannabes.
--
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.
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2017-08-07 22:53 +0200 |
| Message-ID | <4025304.LvFx2qVVIh@PointedEars.de> |
| In reply to | #33701 |
Thomas 'PointedEars' Lahn wrote: > Andrew Poulos wrote: >> On 7/08/2017 7:10 PM, Julio Di Egidio wrote: >>> On Monday, August 7, 2017 at 8:40:13 AM UTC+2, Andrew Poulos wrote: >>>> In a page head there are references to a number of stylesheets >>>> >>>> <link id="black" type="text/css" rel="stylesheet" disabled >>>> href="black.css"> <link id="blue" type="text/css" rel="stylesheet" >>>> disabled href="blue.css"> <link id="green" type="text/css" >>>> rel="stylesheet" disabled href="_green.css"> >>>> ... >> […] > Because of the references in HTML 5.x and WHATWG HTML, one must assume > that the `disabled` property of `link` element objects is now implemented > only according to the `StyleSheet` interface of the CSS Object Model > (CSSOM) Specification, which is still a Working/Editor’s Draft: > > <https://www.w3.org/TR/2016/WD-cssom-1-20160317/#the-stylesheet-interface> > <https://drafts.csswg.org/cssom/#the-stylesheet-interface> (2017-08-07) Those are alternative stylesheets, so you should also provide the `alternate` keyword in the `rel` attribute value for those that should not be immediately applied. Curiously, in Chromium at least then the alternative stylesheet is only applied if first I set the `disabled` property on the corresponding element object to “true”, which causes a “disabled” attribute to appear in the markup view, and then to “false”, which causes the attribute to disappear again. -- 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.
[toc] | [prev] | [next] | [standalone]
| From | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| Date | 2017-08-08 12:31 +1000 |
| Message-ID | <__KdnROBJc8PvxTEnZ2dnUU7-dXNnZ2d@westnet.com.au> |
| In reply to | #33705 |
On 8/08/2017 6:53 AM, Thomas 'PointedEars' Lahn wrote: > Thomas 'PointedEars' Lahn wrote: > >> Andrew Poulos wrote: >>> On 7/08/2017 7:10 PM, Julio Di Egidio wrote: >>>> On Monday, August 7, 2017 at 8:40:13 AM UTC+2, Andrew Poulos wrote: >>>>> In a page head there are references to a number of stylesheets >>>>> >>>>> <link id="black" type="text/css" rel="stylesheet" disabled >>>>> href="black.css"> <link id="blue" type="text/css" rel="stylesheet" >>>>> disabled href="blue.css"> <link id="green" type="text/css" >>>>> rel="stylesheet" disabled href="_green.css"> >>>>> ... >>> […] >> Because of the references in HTML 5.x and WHATWG HTML, one must assume >> that the `disabled` property of `link` element objects is now implemented >> only according to the `StyleSheet` interface of the CSS Object Model >> (CSSOM) Specification, which is still a Working/Editor’s Draft: >> >> <https://www.w3.org/TR/2016/WD-cssom-1-20160317/#the-stylesheet-interface> >> <https://drafts.csswg.org/cssom/#the-stylesheet-interface> (2017-08-07) > > Those are alternative stylesheets, so you should also provide the > `alternate` keyword in the `rel` attribute value for those that should not > be immediately applied. > > Curiously, in Chromium at least then the alternative stylesheet is only > applied if first I set the `disabled` property on the corresponding element > object to “true”, which causes a “disabled” attribute to appear in the > markup view, and then to “false”, which causes the attribute to disappear > again. I discovered alternative stylesheet earlier today and after some experimentation and googling I've dropped the idea of being able to enable one of a number of "disabled" stylesheets in a page. I just can't get it to work consistently across the handful of browsers I'm testing on. Instead I using js to dynamically add the stylesheet that was to be enabled to the head. Andrew Poulos
[toc] | [prev] | [next] | [standalone]
| From | Julio Di Egidio <julio@diegidio.name> |
|---|---|
| Date | 2017-08-07 20:48 -0700 |
| Message-ID | <b1831574-5ba6-4556-af21-c14a92268d5f@googlegroups.com> |
| In reply to | #33701 |
On Monday, August 7, 2017 at 10:30:43 PM UTC+2, Thomas 'PointedEars' Lahn wrote: > Andrew Poulos wrote: > > On 7/08/2017 7:10 PM, Julio Di Egidio wrote: > >> On Monday, August 7, 2017 at 8:40:13 AM UTC+2, Andrew Poulos wrote: <snip> > >>> This implies that what I'm doing should work > >>> <https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet/disabled> > >> > >> Yes, it should, but support for these "fringe" features is not > >> guaranteed. > > This is not a “‘fringe’ feature”. The property must have been supported for > several years now, considering that I have been using the Web Developer > extension, which provides a UI to do that, for that long. (Currently there > is no information about it on <http://caniuse.com/>.) You are way more incompetent that you can even guess. <https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes#Content_versus_IDL_attributes> > > Ok, thanks. It looks like I'll need to look at doing something like > > dynamically adding the required stylesheet instead. > > Or not listen to wannabes. And way more stupid... *Plonk* Julio
[toc] | [prev] | [next] | [standalone]
| From | James Kirk <noneya.invalid@gmail.com> |
|---|---|
| Date | 2017-08-07 14:43 -0400 |
| Message-ID | <20170807144338.000038c8@james.kirk.invalid> |
| In reply to | #33692 |
In-Reply-To: <kZ6dnVj08fqglhXEnZ2dnUU7-X3NnZ2d@westnet.com.au>
Andrew Poulos <ap_prog@hotmail.com> wrote:
> In a page head there are references to a number of stylesheets
> <link id="black" type="text/css" rel="stylesheet" disabled
> href="black.css"> <link id="blue" type="text/css"
> rel="stylesheet" disabled href="blue.css"> <link id="green"
> type="text/css" rel="stylesheet" disabled href="_green.css"> ...
> The js, which is called after the stylesheet references, in the
> page enables one of the stylesheets, eg
> document.getElementById("black").disabled = false;
> On Chrome, IE, Edge and Brave (and on an iPad) the enabled
> stylesheet is the one that is applied.
> With Firefox the "last" stylesheet is always applied irrespective
> of which stylesheet is enabled. How can I get Firefox to only
> apply the enabled stylesheet?
> This implies that what I'm doing should work
> <https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet/disabled>
Have you considered removing the disabled attribute, setting the rel
attribute to 'alternate stylesheet' and then toggle the rel
attribute between 'alternate stylesheet' & stylesheet?
--
James Kirk
[toc] | [prev] | [next] | [standalone]
| From | James Kirk <noneya.invalid@gmail.com> |
|---|---|
| Date | 2017-08-07 19:50 -0400 |
| Message-ID | <20170807195037.00006697@james.kirk.invalid> |
| In reply to | #33697 |
In-Reply-To: <20170807144338.000038c8@james.kirk.invalid> James Kirk <noneya.invalid@gmail.com> wrote: > In-Reply-To: <kZ6dnVj08fqglhXEnZ2dnUU7-X3NnZ2d@westnet.com.au> > Andrew Poulos <ap_prog@hotmail.com> wrote: [snip] > Have you considered removing the disabled attribute, setting the > rel attribute to 'alternate stylesheet' and then toggle the rel > attribute between 'alternate stylesheet' & stylesheet? In FireFox when rel attribute is set to stylesheet, the rel attribute needs to be removed before setting it to 'alternate stylesheet'. -- James Kirk
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2017-08-08 06:40 +0200 |
| Message-ID | <2062955.ElGaqSPkdT@PointedEars.de> |
| In reply to | #33706 |
James Kirk wrote: > In-Reply-To: <20170807144338.000038c8@james.kirk.invalid> > James Kirk <noneya.invalid@gmail.com> wrote: It is called “attribution *line*”, not “attribution novel”. Also, the Reply-To header field of your postings is not only invalid, it is completely borked. This is anti-social and a gross violation of the rules of the news server that you are using. >> In-Reply-To: <kZ6dnVj08fqglhXEnZ2dnUU7-X3NnZ2d@westnet.com.au> >> Andrew Poulos <ap_prog@hotmail.com> wrote: > > [snip] > >> Have you considered removing the disabled attribute, setting the >> rel attribute to 'alternate stylesheet' and then toggle the rel >> attribute between 'alternate stylesheet' & stylesheet? > > In FireFox when rel attribute is set to stylesheet, the rel attribute > needs to be removed before setting it to 'alternate stylesheet'. If that were true, there is no good reason that the “rel” attribute value needs to be dynamically modified in the first place. BTW, the name is “Firefox”, not “FireFox”. -- 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.
[toc] | [prev] | [next] | [standalone]
| From | James Kirk <noneya.invalid@gmail.com> |
|---|---|
| Date | 2017-08-08 05:43 -0400 |
| Subject | OT standard whining from PointedEars nothing useful here |
| Message-ID | <20170808054324.0000202e@james.kirk.invalid> |
| In reply to | #33711 |
In-Reply-To: <2062955.ElGaqSPkdT@PointedEars.de> Thomas 'PointedEars' Lahn <PointedEars@web.de> wrote: > James Kirk wrote: >> In-Reply-To: <20170807144338.000038c8@james.kirk.invalid> >> James Kirk <noneya.invalid@gmail.com> wrote: > It is called “attribution *line*”, not “attribution > novel”. V fnl vg'f zber yvxr n ohfvarff pneq, boivbhfyl fbzrbar gung unf arire ernq n abiry jbhyq znxr fhpu n pynvz. > Also, the Reply-To header field of your postings is not only > invalid, it is completely borked. This is anti-social and a gross > violation of the rules of the news server that you are using. Bu zl! V thrff V unir gb trg nabgure arjfernqre! The Reply-To email address is valid and at my disposal. Absolutely no violation at all and certainly not anti-social. Go ahead give it a go. Tb chg lbhe ovt obl cnagvrf ba fb lbh pna xrrc lbhe urnq bhg bs lbhe nff naq pbjobl hc. Ab bar jnagf gb urne lbh juvar naq pel nobhg fhpu gevivny penc. [snip] >>> Have you considered removing the disabled attribute, setting >>> the rel attribute to 'alternate stylesheet' and then toggle the >>> rel attribute between 'alternate stylesheet' & stylesheet? >> In FireFox when rel attribute is set to stylesheet, the rel >> attribute needs to be removed before setting it to 'alternate >> stylesheet'. > If that were true, there is no good reason that the “rel” > attribute value needs to be dynamically modified in the first > place. So nothing useful to the thread or the group? Surely you can come up with something better then "there is no good reason", you know to keep up appearances so you could still get your whining in. > BTW, the name is “Firefox”, not “FireThere is no javascript! There is > no webpage!Fox”. Gurer vf ab wninfpevcg! Gurer vf ab jrocntr! Pna lbh oerngu bx jvgu lbh urnq hc lbhe nff be qb lbh unir gb sbepr vg bhg sebz gvzr gb gvzr gur gnxr n oerngu? Pbafvqre punatvat lbh avpxanzr gb 'bsgra jebat' gur byqre lbh trg gur zber npphengr vg jvyy or, vg'f rira fgne gerx eryngrq.Pna lbh oerngu bx jvgu lbh urnq hc lbhe nff be qb lbh unir gb sbepr vg bhg sebz gvzr gb gvzr gur gnxr n oerngu? -- James Kirk
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2017-08-08 13:03 +0200 |
| Subject | Re: Disabled stylesheet still used (was: OT standard whining from **** nothing useful here) |
| Message-ID | <4309997.GXAFRqVoOG@PointedEars.de> |
| In reply to | #33712 |
James Kirk trolled: > Surely you can come up with something better then "there is no good > reason", […] Yes, I have. *PLONK* F’up2 poster -- 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.
[toc] | [prev] | [next] | [standalone]
| From | JJ <jj4public@vfemail.net> |
|---|---|
| Date | 2017-08-08 01:55 +0700 |
| Message-ID | <15xz0uq5s3f4v.187a7ox0nfqz3$.dlg@40tude.net> |
| In reply to | #33692 |
On Mon, 7 Aug 2017 16:39:57 +1000, Andrew Poulos wrote:
> In a page head there are references to a number of stylesheets
>
> <link id="black" type="text/css" rel="stylesheet" disabled href="black.css">
> <link id="blue" type="text/css" rel="stylesheet" disabled href="blue.css">
> <link id="green" type="text/css" rel="stylesheet" disabled
> href="_green.css">
> ....
>
> The js, which is called after the stylesheet references, in the page
> enables one of the stylesheets, eg
>
> document.getElementById("black").disabled = false;
>
> On Chrome, IE, Edge and Brave (and on an iPad) the enabled stylesheet is
> the one that is applied.
>
> With Firefox the "last" stylesheet is always applied irrespective of
> which stylesheet is enabled. How can I get Firefox to only apply the
> enabled stylesheet?
>
> This implies that what I'm doing should work
> <https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet/disabled>
>
> Andrew Poulos
The `disabled` HTML element attribute is for elements which can receive
input. e.g. activation, checkbox/radio selection, click, etc.
[toc] | [prev] | [next] | [standalone]
| From | JJ <jj4public@vfemail.net> |
|---|---|
| Date | 2017-08-08 01:58 +0700 |
| Message-ID | <112y1mgo98mnd.phm6uqpugiqn.dlg@40tude.net> |
| In reply to | #33698 |
On Mon, 7 Aug 2017 16:39:57 +1000, Andrew Poulos wrote: > With Firefox the "last" stylesheet is always applied irrespective of > which stylesheet is enabled. How can I get Firefox to only apply the > enabled stylesheet? You'll need to either change the `href` attribute, or remove the element. If it's an inline style, removing the element is the only option.
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2017-08-07 22:32 +0200 |
| Message-ID | <5319472.lOV4Wx5bFT@PointedEars.de> |
| In reply to | #33699 |
JJ wrote: > On Mon, 7 Aug 2017 16:39:57 +1000, Andrew Poulos wrote: >> With Firefox the "last" stylesheet is always applied irrespective of >> which stylesheet is enabled. How can I get Firefox to only apply the >> enabled stylesheet? > > You'll need to either change the `href` attribute, or remove the element. No. > If it's an inline style, removing the element is the only option. It is *obviously* not an “inline style”. -- 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.
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2017-08-07 21:37 +0200 |
| Message-ID | <2418385.mvXUDI8C0e@PointedEars.de> |
| In reply to | #33698 |
JJ wrote: > On Mon, 7 Aug 2017 16:39:57 +1000, Andrew Poulos wrote: >> This implies that what I'm doing should work >> <https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet/disabled> > > The `disabled` HTML element attribute is for elements which can receive > input. e.g. activation, checkbox/radio selection, click, etc. *Obviously*, _not_ *only* for those. I leave it to you to find the corresponding sections in the HTML 5.x Specifications. -- 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.
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2017-08-07 22:31 +0200 |
| Message-ID | <5087957.DvuYhMxLoT@PointedEars.de> |
| In reply to | #33698 |
JJ wrote:
> On Mon, 7 Aug 2017 16:39:57 +1000, Andrew Poulos wrote:
>> The js, which is called after the stylesheet references, in the page
>> enables one of the stylesheets, eg
>>
>> document.getElementById("black").disabled = false;
>>
>> […]
>> This implies that what I'm doing should work
>> <https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet/disabled>
>
> The `disabled` HTML element attribute is for elements which can receive
> input. e.g. activation, checkbox/radio selection, click, etc.
Yes, but there are *markup* attributes and *DOM interface* attributes.
--
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.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web