- From: xgqfrms-gildata via GitHub <sysbot+gh@w3.org>
- Date: Tue, 26 Dec 2017 09:52:29 +0000
- To: public-css-archive@w3.org
xgqfrms-gildata has just created a new issue for https://github.com/w3c/csswg-drafts: == css var & font-size bug == # css var & font-size bug ![image](https://user-images.githubusercontent.com/29531779/34353770-248c307c-ea65-11e7-8bef-27c8919f73db.png) > what's wrong with? 1. the `h1` is ok, `font-size: var(--fs)*2;`; 2. the `span` is not work, `font-size: var(--fs)*2;`. ```html <!DOCTYPE html> <html lang="zh-Hans"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>webpack3</title> <link rel="stylesheet" href="./index.css"> </head> <body> <section> <header> <h1>hello, wp3!</h1> <span data-fs="font-size">this is a big font span!</span> </header> </section> </body> </html> ``` ```css @charset "UTF-8"; /* var & css */ :root { --fontSize: 12px; --font-family: "Microsoft YaHei", sans-serif; --fs: 16px; --red: #f00; --green: #0f0; } h1 { /* font-size: var(--fontSize)*2; */ font-size: var(--fs)*2; color: var(--red, red); } span[data-fs="font-size"] { /* font-size: var(--fs)*2; */ font-size: var(--fontSize)*2; /* font-size: 23px; */ color: var(--green); } ``` Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2137 using your GitHub account
Received on Tuesday, 26 December 2017 09:52:34 UTC