Sin descripción
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

card-description.html 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template id="card-description">
  2. <style>
  3. div {
  4. margin-top: 0.5em;
  5. margin-bottom: 0.0em;
  6. font-size: inherit;
  7. }
  8. ::content > * {
  9. display: inline;
  10. font-size: inherit;
  11. color: black;
  12. }
  13. ::content > h4 {
  14. font-weight: bold;
  15. font-size: inherit;
  16. font-style: italic;
  17. }
  18. ::content > h4:after {
  19. content: ".";
  20. }
  21. ::content > h4 + p {
  22. margin-left: 0.4em;
  23. }
  24. </style>
  25. <div>
  26. <content></content>
  27. </div>
  28. </template>
  29. <script>
  30. (function (window, document) {
  31. var elemName = 'card-description';
  32. var mainDoc = document;
  33. var importDoc = document.currentScript.ownerDocument;
  34. var proto = Object.create(HTMLElement.prototype);
  35. proto.createdCallback = function () {
  36. var template = importDoc.getElementById(elemName);
  37. var clone = mainDoc.importNode(template.content, true);
  38. var root = this.createShadowRoot();
  39. root.appendChild(clone);
  40. }
  41. mainDoc.registerElement(elemName, { prototype: proto });
  42. })(window, document);
  43. </script>