From 50765fcb297536aa15fd950c2e29c9d712368eb2 Mon Sep 17 00:00:00 2001 From: Martin Artnik Date: Tue, 6 Jun 2023 09:23:49 +0200 Subject: [PATCH 1/2] Fix protocol styling issues (disable Tailwind Preflight) [SCI-8617] --- app/assets/stylesheets/application.tailwind.css | 4 ---- app/assets/stylesheets/my_modules/protocol.scss | 1 + config/tailwind.config.js | 3 +++ 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css index d043b4c84..9ec9ea257 100644 --- a/app/assets/stylesheets/application.tailwind.css +++ b/app/assets/stylesheets/application.tailwind.css @@ -6,7 +6,3 @@ html { font-size: 16px; } - -img { - display:inline -} diff --git a/app/assets/stylesheets/my_modules/protocol.scss b/app/assets/stylesheets/my_modules/protocol.scss index f8fdb25a0..3af85c8b0 100644 --- a/app/assets/stylesheets/my_modules/protocol.scss +++ b/app/assets/stylesheets/my_modules/protocol.scss @@ -95,6 +95,7 @@ .tiny-mce-editor { flex-basis: 100%; + max-width: 100%; } } } diff --git a/config/tailwind.config.js b/config/tailwind.config.js index f93a20342..f9a003676 100644 --- a/config/tailwind.config.js +++ b/config/tailwind.config.js @@ -8,6 +8,9 @@ module.exports = { './app/javascript/**/*.vue', './app/views/**/*.{erb,haml,html,slim}' ], + corePlugins: { + preflight: false + }, theme: { extend: { fontFamily: { From 18214f749be067d73ec3c337aaef1a949d474b38 Mon Sep 17 00:00:00 2001 From: Martin Artnik Date: Tue, 6 Jun 2023 10:28:24 +0200 Subject: [PATCH 2/2] Allow blob image source [SCI-8617] --- config/initializers/security_policy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/security_policy.rb b/config/initializers/security_policy.rb index ad3c57d8a..ccd718265 100644 --- a/config/initializers/security_policy.rb +++ b/config/initializers/security_policy.rb @@ -8,7 +8,7 @@ Rails.application.config.content_security_policy do |policy| policy.default_src :self, :https policy.base_uri :self policy.font_src :self, :https, :data - policy.img_src :self, :https, :data + policy.img_src :self, :https, :data, :blob policy.object_src :none policy.script_src :self, :https, :unsafe_eval policy.style_src :self, :https, :unsafe_inline, :data