@diddledan/proportional-height-box
Version:
Web component to resize child element to proportional height based on the width similar to fitvids
30 lines (26 loc) • 866 B
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
<title>proportional-height-box test</title>
<script src="../../@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
<script src="../../web-component-tester/browser.js"></script>
</head>
<body>
<test-fixture id="basic">
<template>
<proportional-height-box></proportional-height-box>
</template>
</test-fixture>
<script type="module">
import '../proportional-height-box.js';
suite('proportional-height-box', function() {
test('instantiating the element works', function() {
var element = fixture('basic');
assert.notEqual(element.shadowRoot, null);
});
});
</script>
</body>
</html>