Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(routes): improve description of backgroundColor param #1400

Merged
merged 1 commit into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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