瀏覽代碼

Test harness stling improvements

Richard Knight 4 年之前
父節點
當前提交
f47cd33cfe
共有 2 個文件被更改,包括 33 次插入18 次删除
  1. 1 1
      src/app/dynaform/services/_formdata-utils.ts
  2. 32 17
      src/styles.scss

+ 1 - 1
src/app/dynaform/services/_formdata-utils.ts

@@ -34,7 +34,7 @@ import * as fmdModels from '../models/field.model';
 const isScalar = val => typeof val === 'boolean' || typeof val === 'number' || typeof val === 'string';
 const isArray = val => Array.isArray(val);
 
-const keyValPairToMeta = (val, key) => ({ name: key, [isScalar(val) ? 'value' : 'meta']: val });
+const keyValPairToMeta = (val: any, key: string) => ({ name: key, [isScalar(val) ? 'value' : 'meta']: val });
 const keyValPairToMetaRecursive = ( [key, val] ) => {
 	if (val === null || val === undefined) {
 		val = ''; // Treat null or undefined as empty string, for purpose of form

+ 32 - 17
src/styles.scss

@@ -58,7 +58,7 @@ div.clr-col-sm-8 {
 }
 
 .red input { 
-	color: rgb(202, 28, 28) !important;
+	color: red !important;
 }
 
 .bgPaleBlue input {
@@ -69,10 +69,26 @@ div.clr-col-sm-8 {
 	input {
 		border-color: purple;
 		border-width: 2px;
-		width: 50%;
+		padding-left: 10px;
+		padding-right: 10px;
 	}
 }
 
+// ---------------------------------------------------------------------------------------------------------------------
+// FormGroup Heading Styles
+
+.h-dyna-2 {
+	font-size: 1.5em;
+}
+
+.h-dyna-3 {
+	font-size: 1.25em;
+}
+
+.h-dyna-4 {
+	font-size: 1.1em;
+}
+
 // ---------------------------------------------------------------------------------------------------------------------
 // Input styles - Clarity
 
@@ -85,11 +101,21 @@ input, textarea, select {
 	}
 }
 
+// These styles *might* not be necessary in apps that use dynaform
+.clr-radio-container {
+	margin-top: 1rem;
+	> label {
+		font-weight: 600;
+	}
+	&.clr-control-inline > label {
+		margin-right: 0.5rem;
+	}
+}
+
 .select:after {
 	display: none;
 }
 
-
 .clr-input, .clr-select, .date-input {
 	color: $col-charcoal;
 	border-bottom:1px lighten($col-charcoal, 20%) solid;
@@ -115,19 +141,8 @@ input, textarea, select {
 	}
 }
 
-// ---------------------------------------------------------------------------------------------------------------------
-// FormGroup Heading Styles
-
-.h-dyna-2 {
-	font-size: 1.5em;
-}
-
-.h-dyna-3 {
-	font-size: 1.25em;
-}
-
-.h-dyna-4 {
-	font-size: 1.1em;
+.row-checkbutton, .row-checkbuttongroup, .row-datepicker, .row-dropdownmodifiedinput {
+	margin-top: 1rem;
 }
 
 // ---------------------------------------------------------------------------------------------------------------------
@@ -137,7 +152,7 @@ input, textarea, select {
 	margin-right: 4px;
 }
 
-// CHeckbutton group
+// Checkbutton group
 .aba-checkbutton-group {
 	.btn { margin-left: 0; margin-right: 4px; }
 }