Skip to content

Commit

Permalink
refactor: remove redundant 'timingFunction' and 'delay' parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Ellet committed Sep 3, 2024
1 parent 9b53c65 commit 2842350
Show file tree
Hide file tree
Showing 24 changed files with 36 additions and 49 deletions.
2 changes: 1 addition & 1 deletion site/.kobweb/site/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion site/.kobweb/site/app.js.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ val BackToTopButtonStyle = CssStyle {
Modifier.rotate(a = 180.deg)
.backgroundColor(ThemeColors.Primary.colorValue)
.transition(
Transition.of(property = "rotate", duration = 200.ms, timingFunction = null, delay = null),
Transition.of(property = "background-color", duration = 150.ms, timingFunction = null, delay = null)
Transition.of(property = "rotate", duration = 200.ms),
Transition.of(property = "background-color", duration = 150.ms)
)
}
hover {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,14 @@ val CheckIndicatorStyle = CssStyle {
Transition.of(
property = "color",
duration = 200.ms,
timingFunction = null, delay = null
),
Transition.of(
property = "border-color",
duration = 200.ms,
timingFunction = null, delay = null
),
Transition.of(
property = "border-width",
duration = 200.ms,
timingFunction = null, delay = null
),
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ val NavigationIconStyle = CssStyle {
Modifier
.color(ThemeColors.Primary.colorValue)
.transition(
Transition.of(property = "color", duration = 50.ms, timingFunction = null, delay = null)
Transition.of(property = "color", duration = 50.ms)
)
}
hover {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ fun SectionTitle(
bottom = 0.px
)
.transition(
Transition.of(property = "margin", duration = 300.ms, timingFunction = null, delay = null)
Transition.of(property = "margin", duration = 300.ms)
),
fontSize = 25.px,
color = ThemeColors.Primary.colorValue
Expand All @@ -86,7 +86,7 @@ fun SectionTitle(
top = 0.px
)
.transition(
Transition.of(property = "margin", duration = 300.ms, timingFunction = null, delay = null)
Transition.of(property = "margin", duration = 300.ms)
)
.fontWeight(FontWeight.Bold),
fontSize = 35.px,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ val AboutImageStyle = CssStyle {
Transition.of(
property = TransitionProperty.All,
duration = 200.ms,
timingFunction = null,
delay = null
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ fun SkillBar(
Transition.of(
property = "width",
duration = 1000.ms,
timingFunction = null, delay = (index + 1) * 100.ms
delay = (index + 1) * 100.ms
)
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ private fun ContactContent() {
Transition.of(
property = "transform",
duration = 500.ms,
timingFunction = null,
delay = null
)
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ val MyTextInputStyle = CssStyle {
.fontSize(18.px)
.padding(12.px)
.transition(
Transition.of(property = "border-color", duration = 150.ms, timingFunction = null, delay = null),
Transition.of(property = "border-color", duration = 150.ms),
// CSSTransition(property = "border-width", duration = 150.ms),
Transition.of(property = "border-shadow", duration = 200.ms, timingFunction = null, delay = null),
Transition.of(property = "border-shadow", duration = 200.ms),
)
}
placeholderShown {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private fun ExperienceSecondPart(
Transition.of(
property = "margin",
duration = 500.ms,
timingFunction = null, delay = experience.ordinal * 80.ms
delay = experience.ordinal * 80.ms,
)
),
experience = experience
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ val helloTextStyle = CssStyle {
.fontSize(45.px)
.color(ThemeColors.PreviousPrimary.colorValue)
.transition(
Transition.of(property = "scale", duration = 200.ms, timingFunction = null, delay = null),
Transition.of(property = "scale", duration = 200.ms),
)
}
hover {
Expand Down Expand Up @@ -258,7 +258,7 @@ val MainImageStyle = CssStyle {
base {
Modifier
.filter(grayscale(100.percent))
.transition(Transition.of(property = "filter", duration = 240.ms, timingFunction = null, delay = null))
.transition(Transition.of(property = "filter", duration = 240.ms))
}
hover {
Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ val NavigationItemStyle = CssStyle {
base {
Modifier.color(ThemeColors.Secondary.colorValue)
.transition(
Transition.of(property = "color", duration = 200.ms, timingFunction = null, delay = null),
Transition.of(property = "scale", duration = 200.ms, timingFunction = null, delay = null),
Transition.of(property = "color", duration = 200.ms),
Transition.of(property = "scale", duration = 200.ms),
// CSSTransition(property = "rotate", duration = 200.ms)
)
}
Expand All @@ -56,7 +56,7 @@ val NavigationItemStyle = CssStyle {
val BrandingLogoStyle = CssStyle {
base {
Modifier.transition(
Transition.of(property = "scale", duration = 200.ms, timingFunction = null, delay = null)
Transition.of(property = "scale", duration = 200.ms)
)
}
onlyChild {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ fun MobileNavigation(modifier: Modifier = Modifier) {
.transition(
Transition.of(
property = "height", duration = 330.ms,
timingFunction = null, delay = null
),
Transition.of(
property = "background-color", duration = 300.ms,
timingFunction = null, delay = null
property = "background-color", duration = 300.ms
),
)
.classNames("hidden")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ val SocialLinkItemStyle = CssStyle {
Transition.of(
property = "color",
duration = 100.ms,
timingFunction = null, delay = null
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@ val DownloadMobileAppButtonStyle = CssStyle {
Transition.of(
property = "background-color",
duration = 200.ms,
timingFunction = null, delay = null
),
Transition.of(
property = "color",
duration = 200.ms,
timingFunction = null, delay = null
),
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,14 @@ val ObjectiveCardStyle = CssStyle {
Transition.of(
property = "background-color",
duration = 150.ms,
timingFunction = null, delay = null
),
Transition.of(
property = "box-shadow",
duration = 100.ms,
timingFunction = null, delay = null
),
Transition.of(
property = "color",
duration = 50.ms,
timingFunction = null, delay = null
),
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ val PortfolioSectionStyle = CssStyle {
cssRule(" > #columnParent > #imageBox > #greenOverlay") {
Modifier.width(0.px)
.transition(
Transition.of(property = "width", duration = 350.ms, timingFunction = null, delay = null)
Transition.of(property = "width", duration = 350.ms)
)
}

Expand All @@ -33,8 +33,8 @@ val PortfolioSectionStyle = CssStyle {
Modifier.visibility(Visibility.Hidden)
.opacity(0.percent)
.transition(
Transition.of(property = "visibility", duration = duration, timingFunction = null, delay = null),
Transition.of(property = "opacity", duration = duration, timingFunction = null, delay = null),
Transition.of(property = "visibility", duration = duration),
Transition.of(property = "opacity", duration = duration),
)
}

Expand All @@ -52,8 +52,8 @@ val PortfolioSectionStyle = CssStyle {
.color(ThemeColors.Secondary.colorValue)
.translateX(0.percent)
.transition(
Transition.of(property = "color", duration = 200.ms, timingFunction = null, delay = null),
Transition.of(property = "translate", duration = 200.ms, timingFunction = null, delay = null),
Transition.of(property = "color", duration = 200.ms),
Transition.of(property = "translate", duration = 200.ms),
)
}

Expand All @@ -70,7 +70,7 @@ val PortfolioSectionStyle = CssStyle {
cssRule(" > #columnParent > #portfolioDesc") {
Modifier
.translateX(0.percent)
.transition(Transition.of(property = "translate", duration = 200.ms, timingFunction = null, delay = null))
.transition(Transition.of(property = "translate", duration = 200.ms))
}

cssRule(":hover > #columnParent > #portfolioDesc") {
Expand All @@ -85,7 +85,7 @@ val PortfolioArrowIconStyle = CssStyle {
base {
Modifier
.color(ThemeColors.Gray.colorValue)
.transition(Transition.of(property = "color", duration = 100.ms, timingFunction = null, delay = null))
.transition(Transition.of(property = "color", duration = 100.ms))
}
hover {
Modifier.color(ThemeColors.Primary.colorValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ val ProductImageStyle = CssStyle {
base {
Modifier
.filter(grayscale(0.percent))
.transition(Transition.of(property = "filter", duration = 240.ms, timingFunction = null, delay = null))
.transition(Transition.of(property = "filter", duration = 240.ms))
}
hover {
Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ val OldProductImageStyle = CssStyle {
base {
Modifier
.filter(grayscale(0.percent))
.transition(Transition.of(property = "filter", duration = 240.ms, timingFunction = null, delay = null))
.transition(Transition.of(property = "filter", duration = 240.ms))
}
hover {
Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ val ServiceCardStyle = CssStyle {
property("box-shadow", "rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px")
}
.transition(
Transition.of(property = "border", duration = 100.ms, timingFunction = null, delay = null),
Transition.of(property = "background", duration = 100.ms, timingFunction = null, delay = null),
Transition.of(property = "box-shadow", duration = 100.ms, timingFunction = null, delay = null),
Transition.of(property = "border", duration = 100.ms),
Transition.of(property = "background", duration = 100.ms),
Transition.of(property = "box-shadow", duration = 100.ms),
)
}
hover {
Expand All @@ -49,7 +49,7 @@ val ServiceCardStyle = CssStyle {
Modifier
.backgroundColor(Colors.Transparent)
.transition(
Transition.of(property = "background", duration = 100.ms, timingFunction = null, delay = null),
Transition.of(property = "background", duration = 100.ms),
)
}

Expand All @@ -61,7 +61,7 @@ val ServiceCardStyle = CssStyle {
Modifier
.color(ThemeColors.Secondary.colorValue)
.transition(
Transition.of(property = "color", duration = 100.ms, timingFunction = null, delay = null),
Transition.of(property = "color", duration = 100.ms),
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ val MainButtonStyle = CssStyle {
.color(Colors.White)
.cursor(Cursor.Pointer)
.transition(
Transition.of(property = "width", duration = 200.ms, timingFunction = null, delay = null),
Transition.of(property = "background-color", duration = 200.ms, timingFunction = null, delay = null),
Transition.of(property = "width", duration = 200.ms),
Transition.of(property = "background-color", duration = 200.ms),
)
}
hover {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ val MySelectStyle = CssStyle {
.fontSize(18.px)
.padding(leftRight = 12.px)
.transition(
Transition.of(property = "border-color", duration = 150.ms, timingFunction = null, delay = null),
Transition.of(property = "border-shadow", duration = 200.ms, timingFunction = null, delay = null),
Transition.of(property = "border-color", duration = 150.ms),
Transition.of(property = "border-shadow", duration = 200.ms),
)
}
focus {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ val DescTextStyle1 = CssStyle {
base {
Modifier
.color(Color("#898E9A"))
.transition(Transition.of(property = "color", duration = 150.ms, timingFunction = null, delay = null))
.transition(Transition.of(property = "color", duration = 150.ms))
}
hover {
Modifier
Expand Down

0 comments on commit 2842350

Please sign in to comment.