UNPKG

@ulb-darmstadt/shacl-form

Version:
49 lines (47 loc) 3.67 kB
form { display:block; --label-width: 8em; --caret-size: 10px; } form.mode-edit { padding-left: 1em; } form, form * { box-sizing: border-box; } shacl-node, .collapsible::part(content) { display: flex; flex-direction: column; width: 100%; position: relative; } shacl-node .remove-button { margin-left: 4px; margin-top: 1px; } shacl-node .add-button { color: #555; background-color: transparent; margin: 4px 24px 0 0; border: 0; } shacl-node .add-button:hover { color:#222; } shacl-node .add-button:focus { box-shadow: none; } shacl-node h1 { font-size: 16px; border-bottom: 1px solid #AAA; margin-top: 4px; color: #555; } shacl-property:not(:has(>.collapsible)), shacl-property>.collapsible::part(content) { display: flex; flex-direction: column; align-items: end; position: relative; } shacl-property:not(.may-add) > .add-button { display: none; } shacl-property:not(.may-remove) > .property-instance > .remove-button:not(.persistent) { visibility: hidden; } shacl-property:not(.may-remove) > .shacl-or-constraint > .remove-button:not(.persistent) { visibility: hidden; } .mode-view .shacl-group:not(:has(shacl-property)) { display: none; } .property-instance, .shacl-or-constraint { display: flex; align-items: flex-start; padding: 4px 0; width: 100%; position: relative; } .shacl-or-constraint > div { display: flex; flex-grow: 1; align-items: flex-start; } .shacl-or-constraint label { display: inline-block; word-break: break-word; width: var(--label-width); line-height: 1em; padding-top: 0.15em; padding-right: 1em; flex-shrink: 0; position: relative; } .property-instance label[title] { cursor: help; text-decoration: underline dashed #AAA; } .property-instance.linked label:after, label.linked:after { content: '\1F517'; font-size: 0.6em; padding-left: 6px; } .mode-edit .property-instance label.required::before { color: red; content: '\2736'; font-size: 0.6rem; position: absolute; left: -1.4em; top: 0.15rem; } .property-instance.valid::before { content: ''; position: absolute; left: calc(var(--label-width) - 1em); top:0.5em; width: 0.9em; height: 0.9em; background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1024 1024" fill="green" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M866.133333 258.133333L362.666667 761.6l-204.8-204.8L98.133333 618.666667 362.666667 881.066667l563.2-563.2z"/></svg>'); } .editor:not([type='checkbox']) { flex-grow: 1; } textarea.editor { resize: vertical; } .lang-chooser { border: 0; background-color: #e9e9ed; padding: 2px 4px; align-self: flex-start; } .validation-error { position: absolute; left: calc(var(--label-width) - 1em); color: red; cursor: help; } .validation-error::before { content: '\26a0' } .validation-error.node { left: -1em; } .invalid > .editor { border-color: red !important; } .ml-0 { margin-left: 0 !important; } .pr-0 { padding-right: 0 !important; } .mode-view .property-instance:not(:first-child) > label { visibility: hidden; } .mode-view .property-instance label { width: var(--label-width); } .d-flex { display: flex; } .lang { opacity: 0.65; font-size: 0.6em; } a, a:visited { color: inherit; } .fadeIn, .fadeOut { animation: fadeIn 0.2s ease-out; } .fadeOut { animation-direction: reverse; animation-timing-function: ease-out;} @keyframes fadeIn { 0% { opacity: 0; transform: scaleY(0.8); } 100% { opacity: 1; transform: scaleY(1); } } .collapsible::part(label) { font-weight: 600; } .collapsible > .property-instance:nth-child(even) { background-color: #F8F8F8; } .collapsible > .property-instance > shacl-node > h1 { display: none; } .ref-link { cursor: pointer; } .ref-link:hover { text-decoration: underline; } .node-id-display { color: #999; font-size: 11px; }