Skip to content

Commit 72a498f

Browse files
committed
Add typed outline modifier
1 parent c9612e0 commit 72a498f

4 files changed

Lines changed: 18 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [0.7.0.4] - 2026-07-18
6+
7+
### Added
8+
9+
- **Typed outline keywords** - `Modifier.outline(OutlineStyle)` applies outline keywords such as
10+
`OutlineStyle.None` without extracting their raw string values
11+
512
## [0.7.0.3] - 2026-07-17
613

714
### Added

summon-core/src/commonMain/kotlin/codes/yousef/summon/modifier/TypedCssModifiers.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,9 @@ fun Modifier.scrollbarWidth(
260260
/** Applies an arbitrary CSS outline shorthand. */
261261
fun Modifier.outline(value: String): Modifier = style("outline", value)
262262

263+
/** Applies a type-safe CSS outline style keyword. */
264+
fun Modifier.outline(style: OutlineStyle): Modifier = outline(style.value)
265+
263266
/** Applies a structured outline declaration. */
264267
fun Modifier.outline(width: String, style: OutlineStyle, color: String): Modifier =
265268
outline("$width ${style.value} $color")

summon-core/src/commonTest/kotlin/codes/yousef/summon/modifier/TypedCssModifiersTest.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ class TypedCssModifiersTest {
101101
assertEquals("2px", modifier.styles["outline-offset"])
102102
}
103103

104+
@Test
105+
fun outlineStyleKeywordUsesTypedValue() {
106+
val modifier = Modifier().outline(OutlineStyle.None)
107+
108+
assertEquals("none", modifier.styles["outline"])
109+
}
110+
104111
@Test
105112
fun gridTrackHelpersBuildResponsiveTemplates() {
106113
val responsive = gridAutoFit(

version.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Centralized version information for Summon
22
# This file is the single source of truth for version information
33
# and is used by both the main project and example projects
4-
VERSION=0.7.0.3
4+
VERSION=0.7.0.4
55
GROUP=codes.yousef
66
ARTIFACT_ID=summon

0 commit comments

Comments
 (0)