Skip to content

Commit

Permalink
feat: allow customising sash animation duration (#740)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwalley committed Jan 15, 2024
1 parent 13ae176 commit e92b944
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/allotment.module.css
@@ -1,5 +1,6 @@
:root {
--separator-border: rgba(128, 128, 128, 0.35);
--sash-hover-transition-duration: 0.1s;
}

.splitView {
Expand Down
2 changes: 1 addition & 1 deletion src/sash/sash.module.css
Expand Up @@ -109,7 +109,7 @@
position: absolute;
width: 100%;
height: 100%;
transition: background-color 0.1s ease-out;
transition: background-color var(--sash-hover-transition-duration) ease-out;
background: transparent;
}

Expand Down
9 changes: 5 additions & 4 deletions website/docs/styling.md
Expand Up @@ -9,10 +9,11 @@ Some common style changes can be made by setting CSS variables.

These include:

| Name | Default | Description |
| :------------------- | :-------------------------- | :----------------------------- |
| `--focus-border` | `#007fd4` | Color of the sash when hovered |
| `--separator-border` | `rgba(128, 128, 128, 0.35)` | Color of the separator |
| Name | Default | Description |
| :--------------------------------- | :-------------------------- | :---------------------------------------------------------------- |
| `--focus-border` | `#007fd4` | Color of the sash when hovered |
| `--separator-border` | `rgba(128, 128, 128, 0.35)` | Color of the separator |
| `--sash-hover-transition-duration` | `0.1s` | Length of time hover transition animation should take to complete |

For more involved styling you can target the component's child elements.

Expand Down

0 comments on commit e92b944

Please sign in to comment.