Bug 155782 - Some CSS Custom Properties do not recalculate when new stylesheet is added to DOM
Summary: Some CSS Custom Properties do not recalculate when new stylesheet is added to...
Status: RESOLVED DUPLICATE of bug 154785
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 9
Hardware: Unspecified OS X 10.11
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-03-22 21:21 PDT by Daniel Freedman
Modified: 2016-03-24 18:42 PDT (History)
6 users (show)

See Also:


Attachments
Minimal reproduction (647 bytes, text/html)
2016-03-22 21:22 PDT, Daniel Freedman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Freedman 2016-03-22 21:21:53 PDT
If a stylesheet is added to the DOM dynamically, and it defines a CSS Custom Property used in another rule for the border property, it does not apply the border effect.

Steps to reproduce
1. Load attached css-vars-late-style.html in Safari 9.1
2. Note that the element with text content "Should be bordered" does not have a border

Expected Results
Div with content "Should be bordered" should have a 10px solid green border.

Actual Results
Div is not bordered

Works in Chrome 49 and Firefox 45
Comment 1 Daniel Freedman 2016-03-22 21:22:19 PDT
Created attachment 274726 [details]
Minimal reproduction
Comment 2 Daniel Freedman 2016-03-22 21:24:58 PDT
After playing with it in the Dev Tools, setting display to none and back to block will trigger the correct effect.
Comment 3 Radar WebKit Bug Importer 2016-03-24 18:23:08 PDT
<rdar://problem/25351781>
Comment 4 Simon Fraser (smfr) 2016-03-24 18:42:30 PDT

*** This bug has been marked as a duplicate of bug 154785 ***