From 9a0d6cca2fa597b30ecaac42e5b9e885e0de62ed Mon Sep 17 00:00:00 2001 From: Jean-Michel FRANCOIS Date: Fri, 12 Apr 2024 17:59:30 +0200 Subject: [PATCH] doc: update --- docs/adr-transition-from-scss-to-css.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/adr-transition-from-scss-to-css.md b/docs/adr-transition-from-scss-to-css.md index 113a049c2fb..37866469d5b 100644 --- a/docs/adr-transition-from-scss-to-css.md +++ b/docs/adr-transition-from-scss-to-css.md @@ -7,7 +7,7 @@ The SCSS compilation step is adding significant overhead to our build process, a ## Decision -We will transition from using SCSS to using plain CSS in our codebase. This decision involves rewriting existing SCSS files into CSS and updating our build and development processes to remove the SASS compiler. +We will start a transition from using SCSS to using plain CSS in our codebase. This decision involves rewriting existing SCSS files into CSS and updating our build and development processes to remove the SASS compiler. ## Consequences @@ -23,9 +23,9 @@ We will transition from using SCSS to using plain CSS in our codebase. This deci ## Implementation Plan -- Audit Existing Stylesheets: Perform a detailed review of all existing SCSS files to determine specific refactoring needs and identify any SCSS features heavily in use that need CSS equivalents. +- Provide a tool to make it possible. -- Create CSS Templates: Develop templates and guidelines for converting SCSS files to CSS to ensure consistency and ease of use moving forward. +- Iteration will be made over the code every time a component is modified. - Gradual Refactoring: Implement the transition in phases, starting with less complex stylesheets. This approach minimizes risk by allowing iterative testing and adjustment. Update Build Process: Modify the build tools and processes to remove SASS compilers and integrate with the new CSS-based workflow. @@ -33,3 +33,12 @@ We will transition from using SCSS to using plain CSS in our codebase. This deci - Documentation and Training: Update project documentation to reflect the new styling practices and conduct training sessions for the development team on effective CSS management without SCSS features. - By documenting this decision in this ADR, we ensure that the rationale and implications are clear and well-communicated to all stakeholders involved. This change aligns with our goals of streamlining our development processes and maintaining a robust and efficient codebase. + +## Tips + +A [script](https://gist.github.com/jmfrancois/16b52b313d35eef589fa2935431d4b70) has been created for this occasion + +`node sassToCss.js /home/jmfrancois/ui/packages/design-system/src /home/jmfrancois/ui/packages/design-system/src` + +Before applying this script you can use this regexp +`var\(([a-z-]*), (.*)\)` to remove the default value in `_tokens.scss` before applying the script