From c7f3c4654e246b2b03972577a221612b689c08a7 Mon Sep 17 00:00:00 2001 From: rittamdebnath Date: Sat, 20 Feb 2016 02:14:34 +0530 Subject: [PATCH] font shorthand --- .gitignore | 4 +- assets/css/2-basics/_body-element.sass | 4 +- assets/css/main.css | 374 ++++++++++++++++--------- assets/css/main.sass | 1 + 4 files changed, 243 insertions(+), 140 deletions(-) diff --git a/.gitignore b/.gitignore index f36bf446..93abe4e9 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,8 @@ Network Trash Folder Temporary Items .apdisk - ### Sass ### .sass-cache + +### Windows and Linux ### +prepros.cfg diff --git a/assets/css/2-basics/_body-element.sass b/assets/css/2-basics/_body-element.sass index eba1341e..3065c451 100644 --- a/assets/css/2-basics/_body-element.sass +++ b/assets/css/2-basics/_body-element.sass @@ -1,8 +1,6 @@ body background-color: white - font-size: 14px - line-height: 1.6 - font-family: 'Fira Sans', sans-serif + font: 14px/1.6 'Fira Sans', sans-serif color: #666 -webkit-font-smoothing: antialiased -webkit-text-size-adjust: 100% diff --git a/assets/css/main.css b/assets/css/main.css index 799eba26..6b552755 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -3,27 +3,35 @@ font-style: normal; font-weight: 400; src: local("Fira Sans"), local("FiraSans-Regular"), url(http://fonts.gstatic.com/s/firasans/v5/EjsrzDkQUQCDwsBtLpcVQZBw1xU1rKptJj_0jans920.woff2) format("woff2"); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; +} + @font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 700; src: local("Fira Sans Bold"), local("FiraSans-Bold"), url(http://fonts.gstatic.com/s/firasans/v5/DugPdSljmOTocZOR2CItOhampu5_7CjHW5spxoeN3Vs.woff2) format("woff2"); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; +} + @font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 400; src: local("Fira Mono"), local("FiraMono"), url(http://fonts.gstatic.com/s/firamono/v3/SlRWfq1zeqXiYWAN-lnG-pBw1xU1rKptJj_0jans920.woff2) format("woff2"); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; +} + /*! normalize.css v3.0.2 | MIT License | git.io/normalize */ html { font-family: sans-serif; -ms-text-size-adjust: 100%; - -webkit-text-size-adjust: 100%; } + -webkit-text-size-adjust: 100%; +} body { - margin: 0; } + margin: 0; +} article, aside, @@ -38,87 +46,108 @@ menu, nav, section, summary { - display: block; } + display: block; +} audio, canvas, progress, video { display: inline-block; - vertical-align: baseline; } + vertical-align: baseline; +} audio:not([controls]) { display: none; - height: 0; } + height: 0; +} [hidden], template { - display: none; } + display: none; +} a { - background-color: transparent; } + background-color: transparent; +} a:active, a:hover { - outline: 0; } + outline: 0; +} abbr[title] { - border-bottom: 1px dotted; } + border-bottom: 1px dotted; +} b, strong { - font-weight: bold; } + font-weight: bold; +} dfn { - font-style: italic; } + font-style: italic; +} h1 { font-size: 2em; - margin: 0.67em 0; } + margin: 0.67em 0; +} mark { background: #ff0; - color: #000; } + color: #000; +} small { - font-size: 80%; } + font-size: 80%; +} sub, sup { font-size: 75%; line-height: 0; position: relative; - vertical-align: baseline; } + vertical-align: baseline; +} sup { - top: -0.5em; } + top: -0.5em; +} sub { - bottom: -0.25em; } + bottom: -0.25em; +} img { - border: 0; } + border: 0; +} svg:not(:root) { - overflow: hidden; } + overflow: hidden; +} figure { - margin: 1em 40px; } + margin: 1em 40px; +} hr { -moz-box-sizing: content-box; box-sizing: content-box; - height: 0; } + height: 0; +} pre { - overflow: auto; } + overflow: auto; +} code, kbd, pre, samp { font-family: monospace, monospace; - font-size: 1em; } + font-size: 1em; +} button, input, @@ -127,153 +156,188 @@ select, textarea { color: inherit; font: inherit; - margin: 0; } + margin: 0; +} button { - overflow: visible; } + overflow: visible; +} button, select { - text-transform: none; } + text-transform: none; +} button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; - cursor: pointer; } + cursor: pointer; +} button[disabled], html input[disabled] { - cursor: default; } + cursor: default; +} button::-moz-focus-inner, input::-moz-focus-inner { border: 0; - padding: 0; } + padding: 0; +} input { - line-height: normal; } + line-height: normal; +} input[type="checkbox"], input[type="radio"] { box-sizing: border-box; - padding: 0; } + padding: 0; +} input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { - height: auto; } + height: auto; +} input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; - box-sizing: content-box; } + box-sizing: content-box; +} input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; } + -webkit-appearance: none; +} fieldset { border: 1px solid #c0c0c0; margin: 0 2px; - padding: 0.35em 0.625em 0.75em; } + padding: 0.35em 0.625em 0.75em; +} legend { border: 0; - padding: 0; } + padding: 0; +} textarea { - overflow: auto; } + overflow: auto; +} optgroup { - font-weight: bold; } + font-weight: bold; +} table { border-collapse: collapse; - border-spacing: 0; } + border-spacing: 0; +} td, th { - padding: 0; } + padding: 0; +} body { background-color: white; - font-size: 14px; - line-height: 1.6; - font-family: "Fira Sans", sans-serif; + font: 14px/1.6 'Fira Sans', sans-serif; color: #666; -webkit-font-smoothing: antialiased; - -webkit-text-size-adjust: 100%; } + -webkit-text-size-adjust: 100%; +} ::selection { - background: #FFF498; } + background: #FFF498; +} ::-moz-selection { - background: #FFF498; } + background: #FFF498; +} img::selection { - background: transparent; } + background: transparent; +} img::-moz-selection { - background: transparent; } + background: transparent; +} body { - -webkit-tap-highlight-color: #FFF498; } + -webkit-tap-highlight-color: #FFF498; +} a { color: #0074D9; text-decoration: none; - outline: 0; } - a:hover, a:focus { - color: #40a6ff; } + outline: 0; +} + +a:hover, a:focus { + color: #40a6ff; +} .gigantic, .huge, .large, .bigger, .big, h1, h2, h3, h4, h5, h6 { color: #222; - font-weight: bold; } + font-weight: bold; +} .gigantic { font-size: 110px; line-height: 1.09; - letter-spacing: -2px; } + letter-spacing: -2px; +} .huge, h1 { font-size: 68px; line-height: 1.05; - letter-spacing: -1px; } + letter-spacing: -1px; +} .large, h2 { font-size: 42px; - line-height: 1.14; } + line-height: 1.14; +} .bigger, h3 { font-size: 26px; - line-height: 1.38; } + line-height: 1.38; +} .big, h4 { font-size: 22px; - line-height: 1.38; } + line-height: 1.38; +} .small, small { font-size: 10px; - line-height: 1.2; } + line-height: 1.2; +} p { - margin: 0 0 20px 0; } + margin: 0 0 20px 0; +} em { - font-style: italic; } + font-style: italic; +} strong { - font-weight: bold; } + font-weight: bold; +} hr { border: solid #ddd; border-width: 1px 0 0; clear: both; margin: 10px 0 30px; - height: 0; } + height: 0; +} .button, button, @@ -288,7 +352,7 @@ input[type="button"] { font-size: 11px; font-weight: 600; line-height: 38px; - letter-spacing: 0.1rem; + letter-spacing: .1rem; text-transform: uppercase; text-decoration: none; white-space: nowrap; @@ -296,23 +360,26 @@ input[type="button"] { border-radius: 4px; border: 1px solid #bbb; cursor: pointer; - box-sizing: border-box; } - .button:hover, .button:active, .button:focus, - button:hover, - button:active, - button:focus, - input[type="submit"]:hover, - input[type="submit"]:active, - input[type="submit"]:focus, - input[type="reset"]:hover, - input[type="reset"]:active, - input[type="reset"]:focus, - input[type="button"]:hover, - input[type="button"]:active, - input[type="button"]:focus { - color: #333; - border-color: #888; - outline: 0; } + box-sizing: border-box; +} + +.button:hover, .button:active, .button:focus, +button:hover, +button:active, +button:focus, +input[type="submit"]:hover, +input[type="submit"]:active, +input[type="submit"]:focus, +input[type="reset"]:hover, +input[type="reset"]:active, +input[type="reset"]:focus, +input[type="button"]:hover, +input[type="button"]:active, +input[type="button"]:focus { + color: #333; + border-color: #888; + outline: 0; +} .name-lockup { display: -webkit-inline-box; @@ -322,7 +389,8 @@ input[type="button"] { -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; - align-items: center; } + align-items: center; +} .avatar { width: 80px; @@ -331,7 +399,8 @@ input[type="button"] { margin-right: 10px; -webkit-flex-shrink: 0; -ms-flex-negative: 0; - flex-shrink: 0; } + flex-shrink: 0; +} .fork-tag { position: absolute; @@ -341,28 +410,39 @@ input[type="button"] { color: white; padding: 2px 6px; transition: all 0.3s ease-in-out; - transform-origin: top right; } - .fork-tag:hover { - color: white; - animation: wiggle 0.4s linear 1; } + transform-origin: top right; +} + +.fork-tag:hover { + color: white; + animation: wiggle 0.4s linear 1; +} @keyframes wiggle { 0% { - transform: rotate(0deg); } + transform: rotate(0deg); + } 20% { - transform: rotate(8deg); } + transform: rotate(8deg); + } 50% { - transform: rotate(-8deg); } + transform: rotate(-8deg); + } 80% { - transform: rotate(8deg); } + transform: rotate(8deg); + } 100% { - transform: rotate(0deg); } } + transform: rotate(0deg); + } +} + .flex-video { height: 0; margin-bottom: 0.88889rem; overflow: hidden; padding-bottom: 56%; - position: relative; } + position: relative; +} .flex-video iframe, .flex-video object, @@ -372,50 +452,72 @@ input[type="button"] { position: absolute; top: 0; width: 100%; - left: 0; } + left: 0; +} body { margin: 10px; background-color: #ddd; - overflow-x: hidden; } + overflow-x: hidden; +} .page-home { - text-align: center; } - .page-home section { - max-width: 600px; - margin: 50px auto; - padding: 40px; - position: relative; - background-color: rgba(255, 255, 255, 0.7); - box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1); } - .page-home section:first-child { - background-image: url(../img/tools.png); - background-position: center; } - .page-home section h1 { - font-weight: 700; - line-height: 1; - margin: 20px 0; - letter-spacing: 1px; } - .page-home img { - max-width: 100%; } - .page-home .flex-video-wrap { - max-width: 640px; - display: inline-block; - width: 100%; } + text-align: center; +} + +.page-home section { + max-width: 600px; + margin: 50px auto; + padding: 40px; + position: relative; + background-color: rgba(255, 255, 255, 0.7); + box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1); +} + +.page-home section:first-child { + background-image: url(../img/tools.png); + background-position: center; +} + +.page-home section h1 { + font-weight: 700; + line-height: 1; + margin: 20px 0; + letter-spacing: 1px; +} + +.page-home img { + max-width: 100%; +} + +.page-home .flex-video-wrap { + max-width: 640px; + display: inline-block; + width: 100%; +} + +.page-home pre { + text-align: left; + font-family: 'Fira Mono', monospace; + font-size: 30px; + color: #d0d0d0; + position: absolute; + top: -50px; + left: -50px; + z-index: -1; + pointer-events: none; +} + +@media (max-width: 500px) { .page-home pre { - text-align: left; - font-family: "Fira Mono", monospace; - font-size: 30px; - color: #d0d0d0; - position: absolute; - top: -50px; - left: -50px; - z-index: -1; - pointer-events: none; } - @media (max-width: 500px) { - .page-home pre { - font-size: 20px; } } - .page-home article { - margin-bottom: 50px; } - .page-home article:last-child { - margin-bottom: 0px; } + font-size: 20px; + } +} + +.page-home article { + margin-bottom: 50px; +} + +.page-home article:last-child { + margin-bottom: 0px; +} diff --git a/assets/css/main.sass b/assets/css/main.sass index 1ee2307e..bfbd7108 100644 --- a/assets/css/main.sass +++ b/assets/css/main.sass @@ -8,6 +8,7 @@ @import '1-tools/vars' + // 2 - BASICS @import '2-basics/body-element' @import '2-basics/selection-colors'