Skip to content

Commit

Permalink
Add: transition filters notes
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicarush committed May 13, 2023
1 parent e4de40c commit 7673fa1
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions css_misc_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,49 @@

<!-- tocstop -->

## Transition filters

You can transition css filters, but the filters applied must match OR only one "end" has the filters. For example:

This works:

```css
.profile-pic {
transition: filter .3s ease-in-out;
}

.profile-pic:hover {
filter: sepia(10%) brightness(1.1);
}
```

And this works:

```css
.profile-pic {
filter: sepia(0%) brightness(1.02);
transition: filter .3s ease-in-out;
}

.profile-pic:hover {
filter: sepia(10%) brightness(1.1);
}
```


But this does NOT work:

```css
.profile-pic {
filter: brightness(1.05);
transition: filter .3s ease-in-out;
}

.profile-pic:hover {
filter: sepia(10%) brightness(1.1);
}
```

## button reset

```css
Expand Down

0 comments on commit 7673fa1

Please sign in to comment.