Skip to content

Commit

Permalink
Check for CSS variable support (#28256)
Browse files Browse the repository at this point in the history
* Check for CSS variable support

* Update extensions/amp-story/1.0/amp-story.js

Co-authored-by: Gabriel Majoulet <gmajoulet@gmail.com>

Co-authored-by: Gabriel Majoulet <gmajoulet@gmail.com>
  • Loading branch information
newmuis and gmajoulet committed May 8, 2020
1 parent 9e048ed commit 34c3f78
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion extensions/amp-story/1.0/amp-story.js
Expand Up @@ -2783,7 +2783,10 @@ export class AmpStory extends AMP.BaseElement {
*/
static isBrowserSupported(win) {
return Boolean(
win.CSS && win.CSS.supports && win.CSS.supports('display', 'grid')
win.CSS &&
win.CSS.supports &&
win.CSS.supports('display', 'grid') &&
win.CSS.supports('color', 'var(--test)')
);
}
}
Expand Down

0 comments on commit 34c3f78

Please sign in to comment.