Skip to content

Latest commit

 

History

History
91 lines (68 loc) · 1.71 KB

DRINKME.md

File metadata and controls

91 lines (68 loc) · 1.71 KB

CSS TEA

Box sizing

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

Rythmic cohesion

Implemention code from the article above :

* + * {
	margin-top: 1.5em;
}

.compact * + * {
	margin-top: 0.75em;
}

.margins-off > * {
	margin-top: 0;
}

Scalable units

Implementation code from Knacss :

html {
  /* set base font-size to equiv "10px", which is adapted to rem unit */
  font-size: 62.5%;
  /* IE9-IE11 math fixing. See http://bit.ly/1g4X0bX */
  /* thanks to @guardian, @victorbritopro and @eQRoeil */
  font-size: calc(1em * 0.625);
}

body {
  font-size: 1.4rem;
  line-height: 1.4;
}

Responsive Images

img {
    max-width: 100%;
    height: auto;
}

Media

Implementation from Solved by Flexbox

.Media {
  display: flex;
  align-items: flex-start;
}

.Media-figure {
  margin-right: 1em;
}

.Media-body {
  flex: 1;
}