_typography.scss 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /******************************************************************
  2. Site Name:
  3. Author:
  4. Stylesheet: Typography
  5. Need to import a font or set of icons for your site? Drop them in
  6. here or just use this to establish your typographical grid. Or not.
  7. Do whatever you want to...GOSH!
  8. Helpful Articles:
  9. http://trentwalton.com/2012/06/19/fluid-type/
  10. http://ia.net/blog/responsive-typography-the-basics/
  11. http://alistapart.com/column/responsive-typography-is-a-physical-discipline
  12. ******************************************************************/
  13. /*********************
  14. FONT FACE (IN YOUR FACE)
  15. *********************/
  16. /* To embed your own fonts, use this syntax
  17. and place your fonts inside the
  18. library/fonts folder. For more information
  19. on embedding fonts, go to:
  20. http://www.fontsquirrel.com/
  21. Be sure to remove the comment brackets.
  22. */
  23. /* @font-face {
  24. font-family: 'Font Name';
  25. src: url('library/fonts/font-name.eot');
  26. src: url('library/fonts/font-name.eot?#iefix') format('embedded-opentype'),
  27. url('library/fonts/font-name.woff') format('woff'),
  28. url('library/fonts/font-name.ttf') format('truetype'),
  29. url('library/fonts/font-name.svg#font-name') format('svg');
  30. font-weight: normal;
  31. font-style: normal;
  32. }
  33. */
  34. /*
  35. The following is based of Typebase:
  36. https://github.com/devinhunt/typebase.css
  37. I've edited it a bit, but it's a nice starting point.
  38. */
  39. // font stacks
  40. $sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif;
  41. $serif: "Georgia", Cambria, Times New Roman, Times, serif;
  42. /*
  43. i imported this one in the functions file so bones would look sweet.
  44. don't forget to remove it for your site.
  45. */
  46. $lato: 'Lato', $sans-serif;
  47. // Typesetting variables
  48. $baseFontSize: 22; // in pixels. This would result in 22px on desktop
  49. $baseLineHeight: 1.5; // how large the line height is as a multiple of font size
  50. $leading: $baseLineHeight * 1rem;
  51. // Rate of growth for headings
  52. // I actually like this to be slightly smaller then the leading. Makes for tight headings.
  53. $scale: 1.414;
  54. /*
  55. some nice typographical defaults
  56. more here: http://www.newnet-soft.com/blog/csstypography
  57. */
  58. p {
  59. line-height: $leading;
  60. margin-top: $leading 0 0;
  61. -ms-word-break: break-all;
  62. -ms-word-wrap: break-all;
  63. word-break: break-word;
  64. word-break: break-word;
  65. // cleaning up the ragged lines and breaks
  66. -webkit-hyphens: auto;
  67. -moz-hyphens: auto;
  68. hyphens: auto;
  69. // sets a minimum number of characters before and after the break
  70. -webkit-hyphenate-before: 2;
  71. -webkit-hyphenate-after: 3;
  72. hyphenate-lines: 3;
  73. // enabling fancy ligatures when available
  74. -webkit-font-feature-settings: "liga", "dlig";
  75. -moz-font-feature-settings: "liga=1, dlig=1";
  76. -ms-font-feature-settings: "liga", "dlig";
  77. -o-font-feature-settings: "liga", "dlig";
  78. font-feature-settings: "liga", "dlig";
  79. }