Path: csiph.com!feeder.erje.net!1.eu.feeder.erje.net!news.albasani.net!.POSTED!not-for-mail From: James Kirk Newsgroups: comp.lang.javascript Subject: Re: Disabled stylesheet still used Date: Mon, 7 Aug 2017 14:43:38 -0400 Organization: Time Travel Tracing Lines: 31 Message-ID: <20170807144338.000038c8@james.kirk.invalid> References: Reply-To: : James Kirk Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net +VyBv+utxbVVyAfW4u5AufH6tgbGkEWwtFhouLkyuY6yxlO71sV+ENfHkGSPGwbraA9IsxTXBusU/mI0MbwkKg== NNTP-Posting-Date: Mon, 7 Aug 2017 18:43:38 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="sD7o7t3X2HkFxfcQWRktC1TrC5GKt58SemrXNwv8ZlpXizRnd0MUuu2P3TNSkhgO+G9g3zn0tc5ZPDaKY5e62xufcHojekvDZxBp+larl1Krg2y+0bx4nK0ufzUSWjen"; mail-complaints-to="abuse@albasani.net" User-Agent: Unicorn named Ellie X-Newsreader: Microsoft Windows Dead Mail Original Imitation Prototype Content-Language: en-US X-Operating-System: Windows 3.0 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== Cancel-Lock: sha1:jyqcU80R/yFJUrQwDZjB0qO8Ddw= Xref: csiph.com comp.lang.javascript:33697 In-Reply-To: Andrew Poulos wrote: > In a page head there are references to a number of stylesheets > href="black.css"> rel="stylesheet" disabled href="blue.css"> 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 > 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