From 9cb7a4a3f59d8489e43bef3a58248ec5e040ccfb Mon Sep 17 00:00:00 2001 From: Alois Klink Date: Thu, 13 Apr 2023 05:58:47 +0100 Subject: [PATCH] fix: fix invalid CSS `fill-opacity` value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix an invalid value for the CSS `fill-opacity` value. Percentage values for `fill-opacity` are only supported in the SVG 2.0 draft, so according to [MDN][1]: > it is not widely supported yet, […] as a consequence, it is best > practices [sic] to set opacity with a value in the range `[0-1]`. [1]: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-opacity --- packages/mermaid/src/diagrams/requirement/styles.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mermaid/src/diagrams/requirement/styles.js b/packages/mermaid/src/diagrams/requirement/styles.js index d0579d204..9db0fa00a 100644 --- a/packages/mermaid/src/diagrams/requirement/styles.js +++ b/packages/mermaid/src/diagrams/requirement/styles.js @@ -16,7 +16,7 @@ const getStyles = (options) => ` .reqBox { fill: ${options.requirementBackground}; - fill-opacity: 100%; + fill-opacity: 1.0; stroke: ${options.requirementBorderColor}; stroke-width: ${options.requirementBorderSize}; } @@ -26,7 +26,7 @@ const getStyles = (options) => ` } .reqLabelBox { fill: ${options.relationLabelBackground}; - fill-opacity: 100%; + fill-opacity: 1.0; } .req-title-line {