From d5c4baf0ec16c8b82c47e0d53543803870b45880 Mon Sep 17 00:00:00 2001 From: "stella.ubaha@boston.gov" Date: Mon, 7 Oct 2024 12:40:18 -0400 Subject: [PATCH 1/2] DIG-5063 Replace SVG embed with svg image --- .../bos_theme/css/bos_theme_overrides.css | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/docroot/themes/custom/bos_theme/css/bos_theme_overrides.css b/docroot/themes/custom/bos_theme/css/bos_theme_overrides.css index ee574f200..35daa1331 100644 --- a/docroot/themes/custom/bos_theme/css/bos_theme_overrides.css +++ b/docroot/themes/custom/bos_theme/css/bos_theme_overrides.css @@ -588,6 +588,19 @@ What: Now using svg image we cannot add a class to the tag. So set css o max-width: 85%; width: 100px; } +@media screen and (max-width: 767px) { + .paragraphs-item-transaction-grid .lwi-ic img { + max-height: 55px; + display: block; + max-width: 85%; + width: 75px; + } +} +@media screen and (max-width: 480px) { + .paragraphs-item-transaction-grid .lwi-ic img { + width: 55px; + } +} /* David: D8 Issue#408. @@ -709,10 +722,18 @@ a .cdd-ic { min-width: 95px; max-width: 95px; } -a .cdd-c svg { +a .cdd-c svg, a .cdd-c article img { height: 56px; width: 56px; } +article .department-icon.sb-ic img { + height: 76px; + width: 76px; +} +article .department-icon.sb-ic img { + +} + /* David: From 607514c4d23ceb470c9adbb408322cadc251d18f Mon Sep 17 00:00:00 2001 From: "stella.ubaha@boston.gov" Date: Mon, 7 Oct 2024 17:02:15 -0400 Subject: [PATCH 2/2] DIG-5063 Replace SVG embed with svg image --- docroot/themes/custom/bos_theme/bos_theme.theme | 2 +- .../custom/bos_theme/css/bos_theme_overrides.css | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/docroot/themes/custom/bos_theme/bos_theme.theme b/docroot/themes/custom/bos_theme/bos_theme.theme index 77e0fcf52..bad319b75 100755 --- a/docroot/themes/custom/bos_theme/bos_theme.theme +++ b/docroot/themes/custom/bos_theme/bos_theme.theme @@ -752,7 +752,7 @@ function bos_theme_preprocess_image(&$variables) { $path = \Drupal::request()->getSchemeAndHttpHost(); $variables['uri'] = str_replace("https://assets.boston.gov/icons", $path . "/themes/custom/patterns/assets/icons", $variables['uri']); } - + $variables['attributes']->addClass("svg-icon"); /* * TODO: Review if the rest of the code in that hook is still actually required. */ diff --git a/docroot/themes/custom/bos_theme/css/bos_theme_overrides.css b/docroot/themes/custom/bos_theme/css/bos_theme_overrides.css index 35daa1331..3213479c3 100644 --- a/docroot/themes/custom/bos_theme/css/bos_theme_overrides.css +++ b/docroot/themes/custom/bos_theme/css/bos_theme_overrides.css @@ -589,7 +589,7 @@ What: Now using svg image we cannot add a class to the tag. So set css o width: 100px; } @media screen and (max-width: 767px) { - .paragraphs-item-transaction-grid .lwi-ic img { + .paragraphs-item-transaction-grid img.svg-icon { max-height: 55px; display: block; max-width: 85%; @@ -597,7 +597,7 @@ What: Now using svg image we cannot add a class to the tag. So set css o } } @media screen and (max-width: 480px) { - .paragraphs-item-transaction-grid .lwi-ic img { + .paragraphs-item-transaction-grid img.svg-icon { width: 55px; } } @@ -722,18 +722,14 @@ a .cdd-ic { min-width: 95px; max-width: 95px; } -a .cdd-c svg, a .cdd-c article img { +a .cdd-c svg, a .cdd-c img.svg-icon { height: 56px; width: 56px; } -article .department-icon.sb-ic img { +.department-icon img.svg-icon { height: 76px; width: 76px; } -article .department-icon.sb-ic img { - -} - /* David: