7
Smooth Width Transition (TreeStyle Hover Size)
Post Flair (click to view more posts with a particular flair)
Post Body
My current CSS code below increases the size of the Sidebar (I'm using TreeStyle) from 168px to 430px when you hover over it. It works just fine but the transition is very instant. I'd rather have a smooth transition.
I've tried using transition: width but it doesn't work. Can anybody help?
Current code:
:root {
--sidebar-normal-width: 168px;
--sidebar-hover-width: 430px;
--background-color: rgb(0,0,0);
}
#sidebar-box {
left: var(--sidebar-normal-width) !important;
min-width: var(--sidebar-normal-width) !important;
}
#sidebar-box:hover {
left: var(--sidebar-hover-width) !important;
min-width: var(--sidebar-hover-width) !important;
}
Other tips to improve/shorten the code are welcomed as well.
Author
Account Strength
100%
Account Age
12 years
Verified Email
Yes
Verified Flair
No
Total Karma
27,246
Link Karma
16,216
Comment Karma
9,660
Profile updated: 1 week ago
Posts updated: 10 months ago
Subreddit
Post Details
We try to extract some basic information from the post title. This is not
always successful or accurate, please use your best judgement and compare
these values to the post title and body for confirmation.
- Posted
- 7 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/FirefoxCSS/...