Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #36931

Re: Edge and CSS vars

Subject Re: Edge and CSS vars
Newsgroups comp.lang.javascript
References <4fadndB_m-sm-5XAnZ2dnUU7-SnNnZ2d@westnet.com.au>
From Andrew Poulos <ap_prog@hotmail.com>
Date 2019-06-18 14:29 +1000
Message-ID <w9adnUd579Fd9ZXAnZ2dnUU7-ePNnZ2d@westnet.com.au> (permalink)

Show all headers | View raw


On 18/06/2019 2:21 pm, Andrew Poulos wrote:
> In a stylesheet I have this
> 
> background: no-repeat left center var(--panebtn-img);
> 
> and in my code when I call this
> 
> document.documentElement.style.setProperty('--panebtn-img',
>    'url("../images/dark.png")');
> 
> Chrome and Firefox duly show the background image but not Edge.
> 
> For Edge the URL needs to be changed to
>    'url("images/dark.png")'

A minute after I posted I found a workaround.

I've set the value to
   'url("images/dark.png"),url("../images/dark.png")'
If a browser can show one of the images it can't show the other.

Andrew Poulos

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Edge and CSS vars Andrew Poulos <ap_prog@hotmail.com> - 2019-06-18 14:21 +1000
  Re: Edge and CSS vars Andrew Poulos <ap_prog@hotmail.com> - 2019-06-18 14:29 +1000
    Re: Edge and CSS vars "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-06-18 10:12 +0200
  Re: Edge and CSS vars Martin Leese <please@see.Web.for.e-mail.INVALID> - 2019-06-18 13:10 -0600

csiph-web