From 412855267c66f3764bb9b040d6659d9e8437e365 Mon Sep 17 00:00:00 2001 From: Guillaume Hivert Date: Thu, 7 Nov 2024 19:18:17 +0100 Subject: [PATCH] Update compose documentation --- sketch/README.md | 8 ++++---- sketch/src/sketch.gleam | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sketch/README.md b/sketch/README.md index c83ec7c..f5003eb 100644 --- a/sketch/README.md +++ b/sketch/README.md @@ -345,10 +345,10 @@ The example above will be compiled to the following CSS. ## Composition Because we oftentimes need to compose CSS classes, Sketch provides a `compose` -function, acting like CSS Modules `compose` property. This allow you to reuse -CSS properties from another class, without having the burden of copy-pasting the -styles, or having to think on the class names to put in your nodes! Of course, -this remains totally optional. An example: +function. This allow you to reuse CSS properties from another class, without +having the burden of copy-pasting the styles, or having to think on the class +names to put in your nodes! Of course, this remains totally optional. An +example: ```gleam fn button_style() { diff --git a/sketch/src/sketch.gleam b/sketch/src/sketch.gleam index 620c3e0..b03cb64 100644 --- a/sketch/src/sketch.gleam +++ b/sketch/src/sketch.gleam @@ -2245,7 +2245,7 @@ pub fn important(style: Style) -> Style { } /// Compose styles by inheriting class, and later overrides them. -/// Works similarly to `composes` property in CSS modules. +/// Every styles from the class will be composed in the resulting class. pub fn compose(class) -> Style { style.ClassName(class) }