From 4de5089be873dc60019c18ee2a1f7acdd0194537 Mon Sep 17 00:00:00 2001 From: Sahil Kapoor Date: Thu, 13 Nov 2025 17:42:29 +0530 Subject: [PATCH 1/3] Replace sass-rails with dartsass-rails - Replace gem 'sass-rails' (>= 6) with gem 'dartsass-rails' to resolve compatibility issues - Update Gemfile.lock accordingly --- Gemfile | 2 +- Gemfile.lock | 52 +++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 42 insertions(+), 12 deletions(-) diff --git a/Gemfile b/Gemfile index af7bbbe25..66f3712df 100644 --- a/Gemfile +++ b/Gemfile @@ -8,7 +8,7 @@ gem "rails", "~> 7.1.3.4" gem "sprockets" # friends of Rails -gem "sass-rails", ">= 6" +gem "dartsass-rails" gem "sprockets-rails" gem "uglifier", ">= 2.7.1" diff --git a/Gemfile.lock b/Gemfile.lock index 99ecd06b2..23efae900 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -145,6 +145,9 @@ GEM connection_pool (2.5.0) crass (1.0.6) csv (3.3.2) + dartsass-rails (0.5.1) + railties (>= 6.0.0) + sass-embedded (~> 1.63) date (3.4.1) devise (4.9.4) bcrypt (~> 3.0) @@ -172,6 +175,27 @@ GEM formtastic_i18n (0.7.0) globalid (1.2.1) activesupport (>= 6.1) + google-protobuf (4.33.0) + bigdecimal + rake (>= 13) + google-protobuf (4.33.0-aarch64-linux-gnu) + bigdecimal + rake (>= 13) + google-protobuf (4.33.0-aarch64-linux-musl) + bigdecimal + rake (>= 13) + google-protobuf (4.33.0-arm64-darwin) + bigdecimal + rake (>= 13) + google-protobuf (4.33.0-x86_64-darwin) + bigdecimal + rake (>= 13) + google-protobuf (4.33.0-x86_64-linux-gnu) + bigdecimal + rake (>= 13) + google-protobuf (4.33.0-x86_64-linux-musl) + bigdecimal + rake (>= 13) has_scope (0.8.2) actionpack (>= 5.2) activesupport (>= 5.2) @@ -368,16 +392,22 @@ GEM ruby2_keywords (0.0.5) ruby_audit (3.0.0) bundler-audit (~> 0.9.0) - sass-rails (6.0.0) - sassc-rails (~> 2.1, >= 2.1.1) - sassc (2.4.0) - ffi (~> 1.9) - sassc-rails (2.1.2) - railties (>= 4.0.0) - sassc (>= 2.0) - sprockets (> 3.0) - sprockets-rails - tilt + sass-embedded (1.94.0-aarch64-linux-gnu) + google-protobuf (~> 4.31) + sass-embedded (1.94.0-aarch64-linux-musl) + google-protobuf (~> 4.31) + sass-embedded (1.94.0-arm-linux-gnueabihf) + google-protobuf (~> 4.31) + sass-embedded (1.94.0-arm-linux-musleabihf) + google-protobuf (~> 4.31) + sass-embedded (1.94.0-arm64-darwin) + google-protobuf (~> 4.31) + sass-embedded (1.94.0-x86_64-darwin) + google-protobuf (~> 4.31) + sass-embedded (1.94.0-x86_64-linux-gnu) + google-protobuf (~> 4.31) + sass-embedded (1.94.0-x86_64-linux-musl) + google-protobuf (~> 4.31) sidekiq (7.3.9) base64 connection_pool (>= 2.3.0) @@ -440,6 +470,7 @@ DEPENDENCIES bootsnap (>= 1.9.4) bullet bundler-audit + dartsass-rails devise (~> 4.7) email_prefixer email_validator @@ -461,7 +492,6 @@ DEPENDENCIES rubocop rubocop-rails ruby_audit - sass-rails (>= 6) sidekiq (< 8) simplecov sprockets From adbedd98d22f4ccd18cd9fe64e506dc115ba2323 Mon Sep 17 00:00:00 2001 From: Sahil Kapoor Date: Thu, 13 Nov 2025 18:31:39 +0530 Subject: [PATCH 2/3] Sass: replace @import with @use and reorder imports to fix deprecation/ordering --- app/javascript/stylesheets/application.scss | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/app/javascript/stylesheets/application.scss b/app/javascript/stylesheets/application.scss index 1d9ae1f90..b0d45b219 100644 --- a/app/javascript/stylesheets/application.scss +++ b/app/javascript/stylesheets/application.scss @@ -1,13 +1,8 @@ -@import "tailwindcss/base"; -@import "tailwindcss/components"; -@import "tailwindcss/utilities"; +@use "tailwindcss/base" as *; +@use "tailwindcss/components" as *; +@use "tailwindcss/utilities" as *; +@use "@bigbinary/neetoui" as *; +@use "layouts/sidebar" as *; +@use "components/notes" as *; @import "react-toastify/dist/ReactToastify.min.css"; - -@import "@bigbinary/neetoui"; - -//Sidebar -@import "layouts/sidebar"; - -//Components -@import "components/notes"; From dd235f814aa8f58365b45036bd3a17f414ffad2e Mon Sep 17 00:00:00 2001 From: Sahil Kapoor Date: Thu, 13 Nov 2025 19:04:31 +0530 Subject: [PATCH 3/3] PostCSS: add color-adjust to print-color-adjust replacement plugin - Add custom PostCSS plugin that automatically replaces deprecated color-adjust property with print-color-adjust --- postcss.config.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/postcss.config.js b/postcss.config.js index 14195b46c..e41f11d7e 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,7 +1,20 @@ +const replaceColorAdjust = () => { + return { + postcssPlugin: "postcss-replace-color-adjust", + Declaration(decl) { + if (decl.prop === "color-adjust") { + decl.prop = "print-color-adjust"; + } + }, + }; +}; +replaceColorAdjust.postcss = true; + module.exports = { plugins: [ require("postcss-import"), require("tailwindcss")("./tailwind.config.js"), + replaceColorAdjust, require("postcss-flexbugs-fixes"), require("postcss-preset-env")({ autoprefixer: {