@haxtheweb/haxcms-nodejs
Version:
HAXcms single and multisite nodejs server, api, and administration
1 lines • 1.67 kB
JavaScript
import"../color.js";const n=document.createElement("template");n.innerHTML='<dom-module id="material-required-field">\n <template>\n <style>\n [part="label"] {\n display: block;\n position: absolute;\n top: 8px;\n font-size: 1em;\n line-height: 1;\n height: 20px;\n margin-bottom: -4px;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n color: var(--material-secondary-text-color);\n transform-origin: 0 75%;\n transform: scale(0.75);\n }\n\n :host([required]) [part="label"]::after {\n content: " *";\n color: inherit;\n }\n\n :host([invalid]) [part="label"] {\n color: var(--material-error-text-color);\n }\n\n [part="error-message"] {\n font-size: .75em;\n line-height: 1;\n color: var(--material-error-text-color);\n }\n\n /* Margin that doesn’t reserve space when there’s no error message */\n [part="error-message"]:not(:empty)::before {\n content: "";\n display: block;\n height: 6px;\n }\n\n :host(:not([invalid])) [part="error-message"] {\n margin-top: 0;\n max-height: 0;\n overflow: hidden;\n }\n\n :host([invalid]) [part="error-message"] {\n animation: reveal 0.2s;\n }\n\n @keyframes reveal {\n 0% {\n opacity: 0;\n }\n }\n\n /* RTL specific styles */\n\n :host([dir="rtl"]) [part="label"] {\n transform-origin: 100% 75%;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);