Skip to content

Commit

Permalink
Responding to usnistgov#1066: metaschema edits; CSS enhancement (#56)
Browse files Browse the repository at this point in the history
* Responding to usnistgov#1066: metaschema edits; CSS enhancement
* Whitespace cleanup in metadata metaschema
* Apply suggestions from code review

Co-authored-by: David Waltermire <[email protected]>
  • Loading branch information
wendellpiez and david-waltermire committed Sep 26, 2022
1 parent 0c957aa commit 7894fef
Show file tree
Hide file tree
Showing 5 changed files with 234 additions and 120 deletions.
65 changes: 55 additions & 10 deletions src/metaschema/metaschema-author.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
METASCHEMA { font-family: Georgia, serif }
METASCHEMA { font-family: Calibri, Verdana, sans-serif }

* { display: block }

Expand All @@ -10,6 +10,11 @@ METASCHEMA { }

title { }

import:before
{ content: 'import module ' oxy_urlChooser(edit, '@href', columns 60) }



define-assembly,
define-field,
define-flag { margin-top: 1ex; margin-bottom: 1ex; border: thin inset black; padding: 0.5em }
Expand All @@ -23,6 +28,15 @@ define-flag:before
oxy_textfield(edit, '@name', columns, 12)
}

root-name:before { content: "Root name: " }


prop:before
{ content: 'property '
oxy_textfield(edit, '@name', columns, 25)
oxy_textfield(edit, '@value', columns, 30)
}


define-assembly[group-as]:before,
define-field[group-as]:before,
Expand All @@ -36,12 +50,6 @@ define-flag * { margin: 0em }

define-assembly > * { margin-top: 1em }

allowed-values:before { content: "Allowed values" }
allowed-values { border: thin solid black; padding: 1em }

enum:before { display: list-item }
enum:before { content: "enum" }

pre { padding: 0.5em; background-color: gainsboro }

define-assembly { }
Expand Down Expand Up @@ -79,6 +87,8 @@ example *:after { content: '</' oxy_name() '>'; font-family: monospace; font-siz

model { padding-left: 0.5em; border-left: medium solid blue; font-size: 80%; padding-right: 2em }

model model { font-size: 100%; }

flag:before { content:
oxy_name()
' ref: ' oxy_textfield(edit, '@ref', columns, 12)
Expand All @@ -105,10 +115,45 @@ prose:before { font-weight: bold; content:

choice > * { margin-left: 2em }

enum { display: block; font-size: 90%; padding-left: 1em }
enum:before { content: oxy_textfield(edit, '@value', columns, 24); }

a { display: inline; color: blue }
a:before { content: oxy_urlChooser(
edit, "@href",
columns 42); }


/* CONSTRAINTS */

constraint > * { border: thin solid black; padding: 0.6em }

allowed-values:before { content: "Allowed values"
' level: ' oxy_combobox(edit, '@level', editable, false, values, "ERROR, WARNING" ) }

enum { margin-left: 2em; display: list-item;
font-size: 90%; padding-left: 1em }
enum:before { content: oxy_textfield(edit, '@value', columns, 24); }

index { }
index:before { content: "Index: "
' name: ' oxy_textfield(edit, '@name', columns, 24)
' target: ' oxy_textfield(edit, '@target', columns, 52)
' level: ' oxy_combobox(edit, '@level', editable, false, values, "ERROR, WARNING" ); }

key-field { margin-left: 2em }
key-field:before { content: "Key field "
' target: ' oxy_textfield(edit, '@target', columns, 52)
' level: ' oxy_combobox(edit, '@level', editable, false, values, "ERROR, WARNING" ); }

expect { }
expect:before { content: "Expect "
' target: ' oxy_textfield(edit, '@target', columns, 52)
' test: ' oxy_textfield(edit, '@test', columns, 36)
' level: ' oxy_combobox(edit, '@level', editable, false, values, "ERROR, WARNING" ); }

index-has-key { }

index-has-key:before { content: "Index has key: "
' name: ' oxy_textfield(edit, '@name', columns, 24)
' target: ' oxy_textfield(edit, '@target', columns, 52)
' level: ' oxy_combobox(edit, '@level', editable, false, values, "ERROR, WARNING" ); }


Loading

0 comments on commit 7894fef

Please sign in to comment.