Skip to content

styling

Steven Steiner edited this page Feb 17, 2021 · 1 revision

Things we might want to change

2.2.1 Indentation

Indent by 2 space at a time

<ul>
  <li>Fantastic
  <li>Great
</ul>

4.1.8 Hexadecimal Notation

Use 3 character hexadecimal notmation where possible

color: #ebc;

Quick Recap

2.1.1 Protocol

Use HTTPS for embedded resources where possible

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min js"></script>

2.2.2 Capitalization

Use only lowercase

color: #e5e5e5;

3.2.3 HTML Quotation Marks

When quoting attributes values, use double quotation marks "" rather than single quotes ''.

<a class="maia-button maia-button-secondary">Sign in</a>

4.1.7 Leading 0s

Omit leading "0"s in values

font-size: .8em;

4.2.4 Property Name Stops

Use a space after a property name's colon

h3 {
  font-weight: bold;
}

4.2.7 Rule Separation

Separate rules by new lines, Always put a blank line (two line breaks) between rules

html {
  background: #fff;
}

body {
  margin: auto;
  width: 50%;
}

4.2.8 CSS Quotation Marks

Use single '' rather than double "" for attribute selection and property values

@import url(https://www.google.com/css/maia.css);

html {
  font-family: 'open sans', arial, sans-serif;
}
Clone this wiki locally