Jump to content

Grouping selectors


midnite

Recommended Posts

can it be "lesser"?as

	a:hover { text-decoration: underline; }	a:active { text-decoration: underline; }

can be grouped as

	a:hover, :active { text-decoration: underline; }

Link to comment
Share on other sites

well you could have

a {text-decoration: underline;}

but this will apply to all your pages links in active, hover, visited statesbtw the default is text-decoration: underline; so you wouldnt need to include this at allbut if you wanted all the sites links to be bold it could be handy e.g.

a {font-weight:bold;}

Link to comment
Share on other sites

oh.. i see. i did have a wrong concept towards grouping selectors. Grouping selectors are *just* for the reason that they all share the same properties. But *NOT* taking any "common factors" of the selectors. Such as

  .abc xxx, yyy { color: red; }

is equivalent to

  .abc xxx { color: red; }  yyy { color: red; }

but *NOT*

  .abc xxx { color: red; }  .abc yyy { color: red; }

me gotta be careful from now on :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...