amberage,
@amberage@eldritch.cafe avatar

Is there an easy way to restore default behaviour in CSS?

I've got a spoiler thing going on where I make text and background black and remove text-decoration for an element. When it's hovered on, I want to restore everything to default. I.e. links should be blue again, purple when visited, underlined, etc.

Recreating all that with CSS is not only more work, but also results in inconsistent behaviour (i.e. color: purple is not the same purple as the default visited link colour, etc.).

Using color: initial; didn't work, the link was black instead of blue.

Meyerweb,
@Meyerweb@mastodon.social avatar

@amberage I believe revert: all does this, though I haven’t tested it on hyperlinks so not 100% confident in this. Maybe 97% confident.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • CSS
  • InstantRegret
  • ngwrru68w68
  • everett
  • mdbf
  • modclub
  • rosin
  • khanakhh
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • Youngstown
  • GTA5RPClips
  • slotface
  • kavyap
  • JUstTest
  • ethstaker
  • osvaldo12
  • normalnudes
  • tacticalgear
  • cisconetworking
  • cubers
  • Durango
  • Leos
  • anitta
  • tester
  • megavids
  • provamag3
  • lostlight
  • All magazines