From b714c3d543a6828395376251376588e643d8d51d Mon Sep 17 00:00:00 2001 From: Lebaud Antoine Date: Mon, 9 Oct 2023 20:13:19 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D(doc)=20update=20instructions=20to?= =?UTF-8?q?=20use=20modern=20SASS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaced deprecated '@import' with '@use' to align with best practices. --- .changeset/rotten-doors-remain.md | 6 ++++++ packages/react/src/docs/installation.mdx | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 .changeset/rotten-doors-remain.md diff --git a/.changeset/rotten-doors-remain.md b/.changeset/rotten-doors-remain.md new file mode 100644 index 0000000..339818c --- /dev/null +++ b/.changeset/rotten-doors-remain.md @@ -0,0 +1,6 @@ +--- +"@openfun/cunningham-react": patch +"cunningham-demo": patch +--- + +Update stylesheet to use modern SASS diff --git a/packages/react/src/docs/installation.mdx b/packages/react/src/docs/installation.mdx index 79f5df3..992c2c9 100644 --- a/packages/react/src/docs/installation.mdx +++ b/packages/react/src/docs/installation.mdx @@ -53,13 +53,15 @@ Then, add these lines at the top of your main stylesheet file: dark format={false} code={` -@import "@openfun/cunningham-react/fonts"; // Imports default fonts ( Roboto ). You can also import fonts by yourself. -@import "@openfun/cunningham-react/icons"; // Imports icons ( Material Icons ). -@import "@openfun/cunningham-react/style"; // Imports the default theme. -@import "cunningham-tokens"; // Imports the file you just generated. +@use "@openfun/cunningham-react/fonts"; // Imports default fonts ( Roboto ). You can also import fonts by yourself. +@use "@openfun/cunningham-react/icons"; // Imports icons ( Material Icons ). +@use "@openfun/cunningham-react/style"; // Imports the default theme. +@use "cunningham-tokens"; // Imports the file you just generated. `} /> +> If you are not using dart sass, you can use `@import`, please visit the [documentation](https://sass-lang.com/documentation/at-rules/import/). + > Please see [here](https://github.com/openfun/cunningham/tree/main/packages/tokens#use-the-design-tokens) to see how to use the design tokens in your source code. We're done! 🎉