-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace VAR_MATCH regex with a simple state machine / callback
Fixes #3190
- Loading branch information
Showing
4 changed files
with
97 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>CSS Gradient in variable</title> | ||
<script>Polymer={useNativeCSSProperties: true, lazyRegister: true}</script> | ||
<link rel="import" href="../../polymer.html"> | ||
</head> | ||
<body> | ||
<style is="custom-style"> | ||
:root { | ||
--a: 10px; | ||
--b: 20px; | ||
--default1: 10px; | ||
} | ||
</style> | ||
<dom-module id="var-el"> | ||
<template> | ||
<style> | ||
:host { | ||
display: block; | ||
height: 100px; | ||
width: 100px; | ||
color: var(--undefined, rgb(123, 321, 231)); | ||
background: var(--fx-webkit-background, -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,0,0,.65)), color-stop(100%,rgba(0,0,255,.65)))); | ||
border-width: calc(var(--a) + var(--b)); | ||
border-color: brown; | ||
border-style: solid; | ||
padding-bottom: var(--undefined, --default1); | ||
} | ||
</style> | ||
<div>Hi!</div> | ||
</template> | ||
<script> | ||
Polymer({ | ||
is: 'var-el' | ||
}) | ||
</script> | ||
</dom-module> | ||
<var-el></var-el> | ||
</body> | ||
</html> |