Skip to content

Commit

Permalink
footer transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
Luki120 committed Aug 15, 2024
1 parent bd451bc commit ec141fc
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions site/src/jsMain/kotlin/me/luki/website/styles/SocialButtonStyle.kt
Original file line number Diff line number Diff line change
@@ -1,19 +1,41 @@
package me.luki.website.styles

import com.varabyte.kobweb.compose.css.Transition
import com.varabyte.kobweb.compose.ui.Modifier
import com.varabyte.kobweb.compose.ui.modifiers.height
import com.varabyte.kobweb.compose.ui.modifiers.scale
import com.varabyte.kobweb.compose.ui.modifiers.transition
import com.varabyte.kobweb.compose.ui.modifiers.width
import com.varabyte.kobweb.silk.style.CssStyle
import com.varabyte.kobweb.silk.style.breakpoint.Breakpoint
import com.varabyte.kobweb.silk.style.plus
import com.varabyte.kobweb.silk.style.selectors.hover
import org.jetbrains.compose.web.css.AnimationTimingFunction
import org.jetbrains.compose.web.css.ms
import org.jetbrains.compose.web.css.px

val SocialButtonStyle = CssStyle(
extraModifier = Modifier
.height(28.px)
.width(28.px)
) {
hover {
Modifier.scale(1.1)
base {
Modifier
.transition(
Transition.all(
duration = 200.ms,
timingFunction = AnimationTimingFunction.EaseInOut
)
)
}
(Breakpoint.MD + hover) {
Modifier
.scale(1.2)
.transition(
Transition.all(
duration = 200.ms,
timingFunction = AnimationTimingFunction.EaseInOut
)
)
}
}

0 comments on commit ec141fc

Please sign in to comment.