Skip to content

Commit

Permalink
Fix: Add schema default values for background image styles (fixes ada…
Browse files Browse the repository at this point in the history
…ptlearning#456)

* Add schema default values for background properties

* Remove empty option from background image properties
  • Loading branch information
swashbuck authored Aug 15, 2023
1 parent d11ec52 commit 17134df
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 36 deletions.
24 changes: 12 additions & 12 deletions properties.schema
Original file line number Diff line number Diff line change
Expand Up @@ -801,23 +801,23 @@
"_backgroundRepeat": {
"type": "string",
"required": false,
"default": "",
"default": "no-repeat",
"inputType": {"type":"Select", "options":["repeat","repeat-x","repeat-y","no-repeat"]},
"title": "Set if/how the background image repeats",
"help": "Repeat-x: The background image is repeated only horizontally. Repeat-y: The background image is repeated only vertically."
},
"_backgroundSize": {
"type": "string",
"required": false,
"default": "",
"default": "cover",
"inputType": {"type":"Select", "options":["auto","cover","contain","100% 100%"]},
"title": "Set the size of the background image",
"help": "Auto: The background image is displayed in its original size. Cover: Resize the background image to cover the entire container, even if it has to stretch or crop the image. Contain: Resize the background image to make sure the image is fully visible. 100% 100%: Resize the background image to match the dimensions of the container."
},
"_backgroundPosition": {
"type": "string",
"required": false,
"default": "",
"default": "center top",
"inputType": {"type":"Select", "options":["left top","left center","left bottom","center top","center center","center bottom","right top","right center","right bottom"]},
"title": "Set the position of the background image",
"help": "The first value is the horizontal position and the second value is the vertical."
Expand Down Expand Up @@ -945,23 +945,23 @@
"_backgroundRepeat": {
"type": "string",
"required": false,
"default": "",
"default": "no-repeat",
"inputType": {"type":"Select", "options":["repeat","repeat-x","repeat-y","no-repeat"]},
"title": "Set if/how the background image repeats",
"help": "Repeat-x: The background image is repeated only horizontally. Repeat-y: The background image is repeated only vertically."
},
"_backgroundSize": {
"type": "string",
"required": false,
"default": "",
"default": "cover",
"inputType": {"type":"Select", "options":["auto","cover","contain","100% 100%"]},
"title": "Set the size of the background image",
"help": "Auto: The background image is displayed in its original size. Cover: Resize the background image to cover the entire container, even if it has to stretch or crop the image. Contain: Resize the background image to make sure the image is fully visible. 100% 100%: Resize the background image to match the dimensions of the container."
},
"_backgroundPosition": {
"type": "string",
"required": false,
"default": "",
"default": "center top",
"inputType": {"type":"Select", "options":["left top","left center","left bottom","center top","center center","center bottom","right top","right center","right bottom"]},
"title": "Set the position of the background image",
"help": "The first value is the horizontal position and the second value is the vertical."
Expand Down Expand Up @@ -1098,23 +1098,23 @@
"_backgroundRepeat": {
"type": "string",
"required": false,
"default": "",
"default": "no-repeat",
"inputType": {"type":"Select", "options":["repeat","repeat-x","repeat-y","no-repeat"]},
"title": "Set if/how the background image repeats",
"help": "Repeat-x: The background image is repeated only horizontally. Repeat-y: The background image is repeated only vertically."
},
"_backgroundSize": {
"type": "string",
"required": false,
"default": "",
"default": "cover",
"inputType": {"type":"Select", "options":["auto","cover","contain","100% 100%"]},
"title": "Set the size of the background image",
"help": "Auto: The background image is displayed in its original size. Cover: Resize the background image to cover the entire container, even if it has to stretch or crop the image. Contain: Resize the background image to make sure the image is fully visible. 100% 100%: Resize the background image to match the dimensions of the container."
},
"_backgroundPosition": {
"type": "string",
"required": false,
"default": "",
"default": "center top",
"inputType": {"type":"Select", "options":["left top","left center","left bottom","center top","center center","center bottom","right top","right center","right bottom"]},
"title": "Set the position of the background image",
"help": "The first value is the horizontal position and the second value is the vertical."
Expand Down Expand Up @@ -1249,23 +1249,23 @@
"_backgroundRepeat": {
"type": "string",
"required": false,
"default": "",
"default": "no-repeat",
"inputType": {"type":"Select", "options":["repeat","repeat-x","repeat-y","no-repeat"]},
"title": "Set if/how the background image repeats",
"help": "Repeat-x: The background image is repeated only horizontally. Repeat-y: The background image is repeated only vertically."
},
"_backgroundSize": {
"type": "string",
"required": false,
"default": "",
"default": "cover",
"inputType": {"type":"Select", "options":["auto","cover","contain","100% 100%"]},
"title": "Set the size of the background image",
"help": "Auto: The background image is displayed in its original size. Cover: Resize the background image to cover the entire container, even if it has to stretch or crop the image. Contain: Resize the background image to make sure the image is fully visible. 100% 100%: Resize the background image to match the dimensions of the container."
},
"_backgroundPosition": {
"type": "string",
"required": false,
"default": "",
"default": "center top",
"inputType": {"type":"Select", "options":["left top","left center","left bottom","center top","center center","center bottom","right top","right center","right bottom"]},
"title": "Set the position of the background image",
"help": "The first value is the horizontal position and the second value is the vertical."
Expand Down
9 changes: 3 additions & 6 deletions schema/article.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,8 @@
"type": "string",
"title": "Repeat",
"description": "Repeat-x: The background image is repeated only horizontally. Repeat-y: The background image is repeated only vertically",
"default": "",
"default": "no-repeat",
"enum": [
"",
"repeat",
"repeat-x",
"repeat-y",
Expand All @@ -129,9 +128,8 @@
"type": "string",
"title": "Size",
"description": "Auto: The background image is displayed in its original size. Cover: Resize the background image to cover the entire container, even if it has to stretch or crop the image. Contain: Resize the background image to make sure the image is fully visible. 100% 100%: Resize the background image to match the dimensions of the container",
"default": "",
"default": "cover",
"enum": [
"",
"auto",
"cover",
"contain",
Expand All @@ -143,9 +141,8 @@
"type": "string",
"title": "Position",
"description": "The first value is the horizontal position and the second value is the vertical",
"default": "",
"default": "center top",
"enum": [
"",
"left top",
"left center",
"left bottom",
Expand Down
9 changes: 3 additions & 6 deletions schema/block.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,8 @@
"type": "string",
"title": "Repeat",
"description": "Repeat-x: The background image is repeated only horizontally. Repeat-y: The background image is repeated only vertically",
"default": "",
"default": "no-repeat",
"enum": [
"",
"repeat",
"repeat-x",
"repeat-y",
Expand All @@ -129,9 +128,8 @@
"type": "string",
"title": "Size",
"description": "Auto: The background image is displayed in its original size. Cover: Resize the background image to cover the entire container, even if it has to stretch or crop the image. Contain: Resize the background image to make sure the image is fully visible. 100% 100%: Resize the background image to match the dimensions of the container",
"default": "",
"default": "cover",
"enum": [
"",
"auto",
"cover",
"contain",
Expand All @@ -143,9 +141,8 @@
"type": "string",
"title": "Position",
"description": "The first value is the horizontal position and the second value is the vertical",
"default": "",
"default": "center top",
"enum": [
"",
"left top",
"left center",
"left bottom",
Expand Down
18 changes: 6 additions & 12 deletions schema/contentobject.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@
"type": "string",
"title": "Repeat",
"description": "Repeat-x: The background image is repeated only horizontally. Repeat-y: The background image is repeated only vertically",
"default": "",
"default": "no-repeat",
"enum": [
"",
"repeat",
"repeat-x",
"repeat-y",
Expand All @@ -83,9 +82,8 @@
"type": "string",
"title": "Size",
"description": "Auto: The background image is displayed in its original size. Cover: Resize the background image to cover the entire container, even if it has to stretch or crop the image. Contain: Resize the background image to make sure the image is fully visible. 100% 100%: Resize the background image to match the dimensions of the container",
"default": "",
"default": "cover",
"enum": [
"",
"auto",
"cover",
"contain",
Expand All @@ -97,9 +95,8 @@
"type": "string",
"title": "Position",
"description": "The first value is the horizontal position and the second value is the vertical",
"default": "",
"default": "center top",
"enum": [
"",
"left top",
"left center",
"left bottom",
Expand Down Expand Up @@ -252,9 +249,8 @@
"type": "string",
"title": "Repeat",
"description": "Repeat-x: The background image is repeated only horizontally. Repeat-y: The background image is repeated only vertically",
"default": "",
"default": "no-repeat",
"enum": [
"",
"repeat",
"repeat-x",
"repeat-y",
Expand All @@ -266,9 +262,8 @@
"type": "string",
"title": "Size",
"description": "Auto: The background image is displayed in its original size. Cover: Resize the background image to cover the entire container, even if it has to stretch or crop the image. Contain: Resize the background image to make sure the image is fully visible. 100% 100%: Resize the background image to match the dimensions of the container",
"default": "",
"default": "cover",
"enum": [
"",
"auto",
"cover",
"contain",
Expand All @@ -280,9 +275,8 @@
"type": "string",
"title": "Position",
"description": "The first value is the horizontal position and the second value is the vertical",
"default": "",
"default": "center top",
"enum": [
"",
"left top",
"left center",
"left bottom",
Expand Down

0 comments on commit 17134df

Please sign in to comment.