1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
-
- <template id="card-property">
- <style>
- :host {
- /* Indenting everything EXCEPT the first line. */
- text-indent: -1em;
- margin-left: 1em;
- font-size: inherit;
- }
-
- ::content > * {
- display: inline;
- font-size: inherit;
- }
-
- ::content > p {
- color: black;
- }
-
- ::content > h4 {
- font-weight: bold;
- color: inherit;
- }
-
- ::content > h4 + p {
- margin-left: 0.0em;
- }
- </style>
-
- <content></content>
-
- </template>
-
- <script>
- (function (window, document) {
- var elemName = 'card-property';
- var mainDoc = document;
- var importDoc = document.currentScript.ownerDocument;
-
- var proto = Object.create(HTMLDivElement.prototype);
- proto.createdCallback = function () {
- var template = importDoc.getElementById(elemName);
- var clone = mainDoc.importNode(template.content, true);
- var root = this.createShadowRoot();
- root.appendChild(clone);
- }
-
- mainDoc.registerElement(elemName, { prototype: proto });
-
- })(window, document);
- </script>
-
|