Skip to content

Commit

Permalink
New package id
Browse files Browse the repository at this point in the history
  • Loading branch information
SalomonBrys committed Apr 25, 2023
1 parent af75f59 commit ef7eda9
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 7 deletions.
16 changes: 15 additions & 1 deletion Readme.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
= Css In Composable
:icons: font
:version: 1.4.0

This library is meant to be used with https://github.com/JetBrains/compose-multiplatform#compose-html[Compose-HTML].

Expand All @@ -7,6 +9,18 @@ It basically does the same thing as https://github.com/JetBrains/kotlin-wrappers

In addition to regular element style, it allows you to style children and pseudo-classes.

== Install

.build.gradle.kts
[source,kotlin,subs="verbatim,attributes"]
----
dependencies {
implementation("org.kodein.compose.html.css:css-in-composable:{version}")
}
----

== Example

Have a look at that example:

[source,kotlin]
Expand Down Expand Up @@ -39,4 +53,4 @@ fun ColoredDiv(text: String) {
<3> Children

You should only use `css` for "immutable" style.
As a new CSS class is generated every time the content changes, you should use `style` for regularly changing style.
As a new CSS class is generated every time the content changes, you should use `css` for regularly changing style.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ plugins {
}

allprojects {
group = "org.kodein.cic"
group = "org.kodein.compose.html.css"
version = "1.4.0"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.kodein.cic
package org.kodein.compose.html.css

import kotlinx.browser.document
import org.jetbrains.compose.web.css.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.kodein.cic
package org.kodein.compose.html.css

import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.kodein.cic
package org.kodein.compose.html.css

import org.jetbrains.compose.web.css.*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.kodein.cic
package org.kodein.compose.html.css

import org.jetbrains.compose.web.css.*
import kotlin.reflect.KProperty
Expand Down
4 changes: 3 additions & 1 deletion test/src/jsMain/kotlin/test.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import org.jetbrains.compose.web.dom.Button
import org.jetbrains.compose.web.dom.Div
import org.jetbrains.compose.web.dom.Text
import org.jetbrains.compose.web.renderComposableInBody
import org.kodein.cic.*
import org.kodein.compose.html.css.animation
import org.kodein.compose.html.css.css
import org.kodein.compose.html.css.globalHtmlCss
import kotlin.time.Duration.Companion.milliseconds


Expand Down

0 comments on commit ef7eda9

Please sign in to comment.