Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

These standards should be followed for how visual designers will code banners and landing pages.

HTML

TBD

CSS/SCSS

Terminology

Rule Declaration

A “rule declaration” is the name given to a selector (or a group of selectors) with an accompanying group of properties. Here's an example:

Code Block
languagecss
themeRDark
firstline1
.listingmy-element-class {
  /* ... */
}

font-size: 18px;[aria-hidden] {
  line-height: 1.2;/* ... */
}

Selectors

In a rule declaration, “selectors” are the bits that determine which elements in the DOM tree will be styled by the defined properties. Selectors can match HTML elements, as well as an element's class, ID, or any of its attributes. Here are some examples of selectors:

...


Code Block
languagecss
themeRDark
firstline1
/* some selector */ 

...

{
 

...

 background: #f1f1f1;
 

...

 color: #333;
}


Properties

Finally, properties are what give the selected elements of a rule declaration their style. Properties are key-value pairs, and a rule declaration can contain one or more property declarations. Property declarations look like this:

/* some selector */ {
  background: #f1f1f1;
  color: #333;
}

JS

TBD

Reference

airbnb coding standards