Compare commits

...

3 Commits

Author SHA1 Message Date
mira 2d964a5027 clarify the docks 2026-09-08 19:26:21 +03:00
mira c64c10e329 Problem: offset work opposite of intuition
Solution:
- it happen as css think it like offseting the view on dasharray, so it moves backward, as I get it.
- But in our context better make it intuitive... so multiply by -1 to slide the line itself. (to the right).
2026-09-08 19:21:16 +03:00
mira 3579893ca4 Problem: Default border is invisible if overflow parent component.
Solution: Add overflow-visible to border svg.
2026-09-08 19:19:09 +03:00
2 changed files with 8 additions and 5 deletions
+6 -4
View File
@@ -62,14 +62,16 @@ and now you are ready to make your borders
## Configuration ## Configuration
- `dashed-border-color-[color]` - `dashed-border-color-[color]`
- `dashed-border-width-[spacing]` - `dashed-border-width-[px]`
- `dashed-border-length-[spacing]` - `dashed-border-length-[spacing]`
- `dashed-border-gap-[spacing]` - `dashed-border-gap-[spacing]`
- `dashed-border-offset-[spacing]` - `dashed-border-offset-[spacing]`
- `dashed-border-align-["inside"/"edge"/"outside"]` - `dashed-border-align-["inside"/"edge"/"outside"]`
- `dashed-border-align-[spacing]` (0 - inside, 1 - outside, etc.) - `dashed-border-align-[[number]]` - example `dashed-border-align-[0.4]` (0 - inside, 0.5 - edge, 1 - outside, etc.)
## Vanilla extended ## Vanilla extended
- `duration-[time]` - `duration-[ms]`
- `[timing function]` (`easing-linear`, `ease-in-out`, etc.) - `[timing function]` (`easing-linear`, `ease-in-out`, etc.)
- `transition-all` - animation may not work without it. - `transition` - allow transition for all border properties.
- `transition-all` - allow transition for all border properties.
- `transition-dashed-border` - to target only dashed border transitions.
+2 -1
View File
@@ -216,6 +216,7 @@ const dashedBorderPlugin: ReturnType<typeof plugin> = plugin(
}, },
".dashed-border-svg": { ".dashed-border-svg": {
position: "absolute", position: "absolute",
overflow: "visible",
inset: "0", inset: "0",
width: "100%", width: "100%",
height: "100%", height: "100%",
@@ -237,7 +238,7 @@ const dashedBorderPlugin: ReturnType<typeof plugin> = plugin(
"stroke-width": "var(--tw-dashed-border-width)", "stroke-width": "var(--tw-dashed-border-width)",
"stroke-dasharray": "stroke-dasharray":
"var(--tw-dashed-border-length) var(--tw-dashed-border-gap)", "var(--tw-dashed-border-length) var(--tw-dashed-border-gap)",
"stroke-dashoffset": "var(--tw-dashed-border-offset)", "stroke-dashoffset": "calc(-1 * var(--tw-dashed-border-offset))",
"vector-effect": "non-scaling-stroke", "vector-effect": "non-scaling-stroke",
x: INSET, x: INSET,
y: INSET, y: INSET,