diff --git a/src/generator.js b/src/generator.js index 0571e5d..2f32c4a 100644 --- a/src/generator.js +++ b/src/generator.js @@ -12,8 +12,6 @@ import { maybe, cell_id, is_nil, get_value } from './utils/index'; import List from './utils/list'; let { join, make_array, remove_empty_values } = List(); -import get_definition from './utils/get-definition'; - function is_host_selector(s) { return /^\:(host|doodle)/.test(s); } @@ -566,14 +564,6 @@ class Rules { }); }); - let definitions = []; - Object.keys(this.custom_properties).forEach(name => { - let def = get_definition(name); - if (def) { - definitions.push(def); - } - }); - return { props: this.props, styles: this.styles, @@ -583,7 +573,6 @@ class Rules { paths: this.paths, canvas: this.canvas, pattern: this.pattern, - definitions: definitions, uniforms: this.uniforms } } diff --git a/src/index.js b/src/index.js index e9f5f85..4a275f1 100644 --- a/src/index.js +++ b/src/index.js @@ -406,13 +406,11 @@ class Doodle extends HTMLElement { } // might be removed in the future - const definitions = compiled.definitions; if (window.CSS && window.CSS.registerProperty) { try { if (uniforms.time) { this.register_uniform_time(); } - definitions.forEach(CSS.registerProperty); } catch (e) { } } } diff --git a/src/utils/get-definition.js b/src/utils/get-definition.js deleted file mode 100644 index c8342fb..0000000 --- a/src/utils/get-definition.js +++ /dev/null @@ -1,28 +0,0 @@ -const initial = { - length: '0px', - number: 0, - color: 'black', - url: 'url()', - image: 'url()', - integer: 0, - angle: '0deg', - time: '0ms', - resolution: '0dpi', - percentage: '0%', - 'length-percentage': '0%', - 'transform-function': 'translate(0)', - 'transform-list': 'translate(0)', - 'custom-ident': '_' -}; - -export default function get_definition(name) { - let type = String(name).substr(2).split('-')[0]; - if (initial[type] !== undefined) { - return { - name: name, - syntax: `<${type}> | <${type}>+ | <${type}>#`, - initialValue: initial[type], - inherits: false - } - } -}