Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.29 KB | None | 0 0
  1. var csjs = require('csjs-inject')
  2.  
  3. module.exports = styleGuide
  4.  
  5. function styleGuide () {
  6. /* --------------------------------------------------------------------------
  7. COLORS
  8. -------------------------------------------------------------------------- */
  9. var blue = '#9DC1F5'
  10. var lightBlue = '#F4F6FF'
  11. var greyBlue = '#102026'
  12. var grey = '#666'
  13. var lightGrey = '#f8f8f8'
  14. var red = '#FF8080'
  15. var lightRed = '#FFB9B9'
  16. var green = '#B1EAC5'
  17. var violet = '#C6CFF7'
  18. var pink = '#EC96EC'
  19. var yellow = '#E6E5A7'
  20. /* --------------------------------------------------------------------------
  21. FONTS
  22. -------------------------------------------------------------------------- */
  23. var texts = csjs `
  24. .title-XL {
  25. font-size : 2em;
  26. font-weight : 700;
  27. letter-spacing : .05em;
  28. }
  29.  
  30. .title-L {
  31. font-size : 1em;
  32. font-weight : 600;
  33. }
  34.  
  35. .title-M {
  36. font-size : .8em;
  37. font-weight : 400;
  38. }
  39.  
  40. .title-S {
  41. font-size : .8em;
  42. font-weight : 300;
  43. }
  44.  
  45. .text {
  46. font-size : .8em;
  47. }
  48. `
  49. /* --------------------------------------------------------------------------
  50. TEXT-BOXES
  51. -------------------------------------------------------------------------- */
  52. var textBoxes = csjs`
  53. .display-box-L {
  54. font-size : 1em;
  55. padding : 8px 15px;
  56. line-height : 20px;
  57. background : #f8f8f8;
  58. border-radius : 3px;
  59. border : 1px solid #e5e5e5;
  60. overflow-x : auto;
  61. width : 100%;
  62. }
  63.  
  64. .info-text-box {
  65. background-color : white;
  66. line-height : 20px;
  67. border : .3em dotted #B1EAC5;
  68. padding : 8px 15px;
  69. border-radius : 3px;
  70. margin-bottom : 1em;
  71. }
  72.  
  73. .warning-text-box {
  74. background-color : #E6E5A7; // yellow
  75. line-height : 20px;
  76. padding : 1em 1em .5em 1em;
  77. border-radius : 3px;
  78. box-shadow : rgba(0,0,0,.2) 0 1px 4px;
  79. margin-bottom : 1em;
  80. }
  81.  
  82. .error-text-box {
  83. background-color : #FFB9B9; // light-red
  84. line-height : 20px;
  85. padding : 1em 1em .5em 1em;
  86. border-radius : 3px;
  87. box-shadow : rgba(0,0,0,.2) 0 1px 4px;
  88. margin-bottom : 1em;
  89. }
  90. `
  91. /* --------------------------------------------------------------------------
  92. BUTTONS
  93. -------------------------------------------------------------------------- */
  94. /*
  95. .button {
  96. border-color: transparent;
  97. margin-right: 1em;
  98. border-radius: 3px;
  99. cursor: pointer;
  100. padding: .3em;
  101. }
  102.  
  103. .button:hover {
  104. opacity: 0.8;
  105. }
  106.  
  107. */
  108.  
  109. /* --------------------------------------------------------------------------
  110. INPUT FIELDS
  111. -------------------------------------------------------------------------- */
  112. /*
  113. .input-field {
  114. border : 1px solid #f0f0f0; // light-grey
  115. padding : .3em;
  116. margin : .3em;
  117. }
  118. */
  119. return {
  120. textBoxL: textBoxes['display-box-L'],
  121. titleL: texts['title-L']
  122. }
  123. }
  124.  
  125. /*
  126. HOW TO USE IT
  127. var csjs = require('csjs-inject')
  128. var styleGuide = require('./app/style-guide')
  129. var styles = styleGuide()
  130.  
  131. var css = csjs`
  132. .foobar extends ${styles.fontXL} {
  133. color: red;
  134. }
  135. `
  136. var el = yo`
  137. <div class=${css.foobar}> alasdalsd </div>
  138. `
  139. */
  140.  
  141. /*
  142. var text = 'foobar'
  143.  
  144. var example1 = 'hello ' + text + ' "world"'
  145. var example2 = "hello " + text + " \"world\""
  146. var example3 = `hello ${text} "world"`
  147.  
  148. // hello foobar "world"
  149.  
  150. <div class='title foo'></div>
  151. <div class="${css.title} ${css.foo}"></div>
  152.  
  153. `<div class="${css.col2} ${styles.textBoxL} ${5+5}">`
  154. // <div class="col2_s3ad textBoxL_13 10">
  155.  
  156. '<div class="${css.col2} ${styles.textBoxL} ${5+5}">'
  157. // <div class="${css.col2} ${styles.textBoxL} ${5+5}">
  158.  
  159. append($('<div class="col2_wefwq textBoxL_efwq">'))
  160.  
  161.  
  162. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement