Skip to main content
CSS-Tricks
  • Articles
  • Alamanac
  • Guides
  • Videos
  • Books
  • Newsletter
Search

Articles Tagged
custom properties

90 Articles
{
,

}
Direct link to the article Individual CSS Transform Functions
custom properties transform

Individual CSS Transform Functions

Dan Wilson documents a classic annoyance with transforms:

button {
  transform: translateY(-150%);
}
button:hover {
  /* will (perhaps unintentionally) override the original translate */
  transform: scale(.8);
}

The native (and WET) solution is list the original transform again:

button:hover {
  
…
Avatar of Chris Coyier
Chris Coyier on Feb 23, 2017
Direct link to the article Random Numbers in CSS
custom properties JavaScript random numbers

Random Numbers in CSS

I stumbled into an interesting problem the other day. I wanted to animate an element with a random animation-duration. …

Avatar of Robin Rendle
Robin Rendle on Jan 11, 2017 (Updated on Sep 15, 2017)
  • Newer
  • 1
  • ...
  • 7
  • 8
  • 9

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • About DO
  • Cloudways hosting
  • Legal stuff
  • Get free credit!
CSS-Tricks
  • Write for us!
  • Advertise with us
  • Contact us
Social
  • RSS Feeds
  • CodePen
  • Mastodon
  • X
Back to Top