Skip to content

Instantly share code, notes, and snippets.

@paulrouget
Created March 9, 2012 11:44
Show Gist options
  • Save paulrouget/2006202 to your computer and use it in GitHub Desktop.
Save paulrouget/2006202 to your computer and use it in GitHub Desktop.
#foo {
color: red;
}
"color" is the property.
"red" is the value.
"color:red" is the declaration.
Spec: http://www.w3.org/TR/1998/REC-CSS2-19980512/syndata.html#declaration
@mdix
Copy link

mdix commented Mar 9, 2012

Isn't it a declaration + an assignment, instead of just a declaration? Ok, well ... implicit declaration.

@fvsch
Copy link

fvsch commented Mar 9, 2012

@mdix: I don’t remember that CSS uses the concept of assignment to describe its syntax.

This is a declaration:

property: value

This is a series of declarations (term not used in the spec):

property: value;
property: value;

This is a declaration block:

{
    property: value;
    property: value;
}

This is a rule set:

selector {
    property: value;
    property: value;
}

@mdix
Copy link

mdix commented Mar 9, 2012

Jepp, it doesn't. I think it would be best described as implicit declaration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment