Skip to content

Commit

Permalink
chore(routes): improve description of backgroundColor param (#1400)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs authored Apr 3, 2023
1 parent 172f7ea commit 1021536
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/plugins/tidy-css/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ async function plugin(server) {
/**
* @param {string} html - Valid HTML.
* @param {object} options - Function config values.
* @param {string=} options.backgroundColor - Color to replace document's original
* `background-color` CSS property for `<div>` elements with.
* @param {string=} options.backgroundColor - Color to set or replace the document's
* `background-color` property value of `div` CSS selectors with.
* @param {string=} options.fonts - Font to replace document's original font(s), can be
* single font or comma separated list i.e `Arial, Sans Serif`.
* @returns {string} HTML with tidied CSS.
Expand Down Expand Up @@ -90,7 +90,7 @@ async function plugin(server) {
*/
styleRule.style.setProperty("page-break-inside", "avoid");

// Replace default color
// Set or replace background color of divs
if (newBackgroundColor) {
styleRule.style.setProperty(
"background-color",
Expand Down
2 changes: 1 addition & 1 deletion src/routes/docx/html/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const docxToHtmlPostSchema = {
"backgroundColor",
S.string()
.description(
"HTML document background color; replace the `background-color` CSS property for `<div>` elements"
"HTML document background color; set or replace the `background-color` property value of `div` CSS selectors"
)
.pattern(/^[#a-zA-Z0-9()%, .]+$/)
.examples([
Expand Down
2 changes: 1 addition & 1 deletion src/routes/pdf/html/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const pdfToHtmlPostSchema = {
"backgroundColor",
S.string()
.description(
"HTML document background color; replace the `background-color` CSS property for `<div>` elements"
"HTML document background color; set or replace the `background-color` property value of `div` CSS selectors"
)
.pattern(/^[#a-zA-Z0-9()%, .]+$/)
.examples([
Expand Down
2 changes: 1 addition & 1 deletion src/routes/rtf/html/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const rtfToHtmlPostSchema = {
"backgroundColor",
S.string()
.description(
"HTML document background color; replace the `background-color` CSS property for `<div>` elements"
"HTML document background color; set or replace the `background-color` property value of `div` CSS selectors"
)
.pattern(/^[#a-zA-Z0-9()%, .]+$/)
.examples([
Expand Down

0 comments on commit 1021536

Please sign in to comment.