New issue
Advanced search Search tips

Issue 850932 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

inherited css variables cannot argument an override

Reported by netmosf...@gmail.com, Jun 8 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36

Steps to reproduce the problem:
The following doesn't work.

div{
  --foo: 200px;
}

div > div{
  --foo: calc(var(--foo) / 10);
  border:var(--foo) red solid;
}

If another variable name is used then it works fine.

What is the expected behavior?
--foo:
    var(--foo) /* computes to
    the inherited value of --foo */;

What went wrong?
no css is applied

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 67.0.3396.79  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version:
 
this is quite an interesting problem because of stuff like this

--a: var(--b);
--b: var(--c);
--c: var(--a);

maybe this could be solved with

  --foo: calc(parent-var(--foo) / 10);
Labels: Needs-Triage-M67
Status: WontFix (was: Unconfirmed)
This is per spec afaict: https://drafts.csswg.org/css-variables/#cycles

Cc: futhark@chromium.org

Sign in to add a comment