cacao-css 3.21.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (356) hide show
  1. package/.prettierignore +10 -0
  2. package/.prettierrc.json +13 -0
  3. package/CHANGELOG.md +112 -104
  4. package/LICENSE +1 -1
  5. package/README.md +8 -472
  6. package/imports.css +282 -0
  7. package/package.json +2 -51
  8. package/src/aspect/aspect.css +23 -0
  9. package/src/base/base.css +44 -0
  10. package/src/config.css +8 -0
  11. package/src/display/core/align.css +15 -0
  12. package/src/display/core/display.css +33 -0
  13. package/src/display/core/flex.css +19 -0
  14. package/src/display/core/justify.css +23 -0
  15. package/src/display/core/order.css +23 -0
  16. package/src/display/lg/align.css +17 -0
  17. package/src/display/lg/display.css +25 -0
  18. package/src/display/lg/flex.css +21 -0
  19. package/src/display/lg/justify.css +25 -0
  20. package/src/display/lg/order.css +25 -0
  21. package/src/display/md/align.css +17 -0
  22. package/src/display/md/display.css +25 -0
  23. package/src/display/md/flex.css +21 -0
  24. package/src/display/md/justify.css +25 -0
  25. package/src/display/md/order.css +25 -0
  26. package/src/display/sm/align.css +17 -0
  27. package/src/display/sm/display.css +25 -0
  28. package/src/display/sm/flex.css +21 -0
  29. package/src/display/sm/justify.css +25 -0
  30. package/src/display/sm/order.css +25 -0
  31. package/src/display/xl/align.css +17 -0
  32. package/src/display/xl/display.css +25 -0
  33. package/src/display/xl/flex.css +21 -0
  34. package/src/display/xl/justify.css +25 -0
  35. package/src/display/xl/order.css +25 -0
  36. package/src/embed/embed.css +21 -0
  37. package/src/fit/fit.css +11 -0
  38. package/src/{css/components/header/header.css → grid/core/col-1.css} +3 -6
  39. package/src/grid/core/col-10.css +43 -0
  40. package/src/grid/core/col-11.css +47 -0
  41. package/src/grid/core/col-12.css +51 -0
  42. package/src/grid/core/col-2.css +11 -0
  43. package/src/{css/components/breadcrumb/breadcrumb.css → grid/core/col-3.css} +8 -9
  44. package/src/grid/core/col-4.css +19 -0
  45. package/src/grid/core/col-5.css +23 -0
  46. package/src/grid/core/col-6.css +27 -0
  47. package/src/grid/core/col-7.css +31 -0
  48. package/src/grid/core/col-8.css +35 -0
  49. package/src/grid/core/col-9.css +39 -0
  50. package/src/grid/grid.css +19 -0
  51. package/src/{css/components/form/required.css → grid/lg/col-1.css} +5 -5
  52. package/src/grid/lg/col-10.css +45 -0
  53. package/src/grid/lg/col-11.css +49 -0
  54. package/src/grid/lg/col-12.css +53 -0
  55. package/src/grid/lg/col-2.css +13 -0
  56. package/src/grid/lg/col-3.css +17 -0
  57. package/src/grid/lg/col-4.css +21 -0
  58. package/src/grid/lg/col-5.css +25 -0
  59. package/src/grid/lg/col-6.css +29 -0
  60. package/src/grid/lg/col-7.css +33 -0
  61. package/src/grid/lg/col-8.css +37 -0
  62. package/src/grid/lg/col-9.css +41 -0
  63. package/src/{css/components/navigation/bar.css → grid/md/col-1.css} +5 -7
  64. package/src/grid/md/col-10.css +45 -0
  65. package/src/grid/md/col-11.css +49 -0
  66. package/src/grid/md/col-12.css +53 -0
  67. package/src/grid/md/col-2.css +13 -0
  68. package/src/grid/md/col-3.css +17 -0
  69. package/src/grid/md/col-4.css +21 -0
  70. package/src/grid/md/col-5.css +25 -0
  71. package/src/grid/md/col-6.css +29 -0
  72. package/src/grid/md/col-7.css +33 -0
  73. package/src/grid/md/col-8.css +37 -0
  74. package/src/grid/md/col-9.css +41 -0
  75. package/src/grid/sm/col-1.css +9 -0
  76. package/src/grid/sm/col-10.css +45 -0
  77. package/src/grid/sm/col-11.css +49 -0
  78. package/src/grid/sm/col-12.css +53 -0
  79. package/src/grid/sm/col-2.css +13 -0
  80. package/src/grid/sm/col-3.css +17 -0
  81. package/src/grid/sm/col-4.css +21 -0
  82. package/src/grid/sm/col-5.css +25 -0
  83. package/src/grid/sm/col-6.css +29 -0
  84. package/src/grid/sm/col-7.css +33 -0
  85. package/src/grid/sm/col-8.css +37 -0
  86. package/src/grid/sm/col-9.css +41 -0
  87. package/src/grid/xl/col-1.css +9 -0
  88. package/src/grid/xl/col-10.css +45 -0
  89. package/src/grid/xl/col-11.css +49 -0
  90. package/src/grid/xl/col-12.css +53 -0
  91. package/src/grid/xl/col-2.css +13 -0
  92. package/src/grid/xl/col-3.css +17 -0
  93. package/src/grid/xl/col-4.css +21 -0
  94. package/src/grid/xl/col-5.css +25 -0
  95. package/src/grid/xl/col-6.css +29 -0
  96. package/src/grid/xl/col-7.css +33 -0
  97. package/src/grid/xl/col-8.css +37 -0
  98. package/src/grid/xl/col-9.css +41 -0
  99. package/src/gutter/core/all.css +31 -0
  100. package/src/gutter/core/horizontal.css +31 -0
  101. package/src/gutter/core/vertical.css +31 -0
  102. package/src/gutter/lg/all.css +33 -0
  103. package/src/gutter/lg/horizontal.css +33 -0
  104. package/src/gutter/lg/vertical.css +33 -0
  105. package/src/gutter/md/all.css +33 -0
  106. package/src/gutter/md/horizontal.css +33 -0
  107. package/src/gutter/md/vertical.css +33 -0
  108. package/src/gutter/sm/all.css +33 -0
  109. package/src/gutter/sm/horizontal.css +33 -0
  110. package/src/gutter/sm/vertical.css +33 -0
  111. package/src/gutter/xl/all.css +33 -0
  112. package/src/gutter/xl/horizontal.css +33 -0
  113. package/src/gutter/xl/vertical.css +33 -0
  114. package/src/image/image.css +30 -0
  115. package/src/links/links.css +18 -0
  116. package/src/margin/core/all.css +27 -0
  117. package/src/margin/core/bottom.css +27 -0
  118. package/src/margin/core/end.css +27 -0
  119. package/src/margin/core/horizontal.css +33 -0
  120. package/src/margin/core/start.css +27 -0
  121. package/src/margin/core/top.css +27 -0
  122. package/src/margin/core/vertical.css +33 -0
  123. package/src/margin/lg/all.css +29 -0
  124. package/src/margin/lg/bottom.css +29 -0
  125. package/src/margin/lg/end.css +29 -0
  126. package/src/margin/lg/horizontal.css +35 -0
  127. package/src/margin/lg/start.css +29 -0
  128. package/src/margin/lg/top.css +29 -0
  129. package/src/margin/lg/vertical.css +35 -0
  130. package/src/margin/md/all.css +29 -0
  131. package/src/margin/md/bottom.css +29 -0
  132. package/src/margin/md/end.css +29 -0
  133. package/src/margin/md/horizontal.css +35 -0
  134. package/src/margin/md/start.css +29 -0
  135. package/src/margin/md/top.css +29 -0
  136. package/src/margin/md/vertical.css +35 -0
  137. package/src/margin/sm/all.css +29 -0
  138. package/src/margin/sm/bottom.css +29 -0
  139. package/src/margin/sm/end.css +29 -0
  140. package/src/margin/sm/horizontal.css +35 -0
  141. package/src/margin/sm/start.css +29 -0
  142. package/src/margin/sm/top.css +29 -0
  143. package/src/margin/sm/vertical.css +35 -0
  144. package/src/margin/xl/all.css +29 -0
  145. package/src/margin/xl/bottom.css +29 -0
  146. package/src/margin/xl/end.css +29 -0
  147. package/src/margin/xl/horizontal.css +35 -0
  148. package/src/margin/xl/start.css +29 -0
  149. package/src/margin/xl/top.css +29 -0
  150. package/src/margin/xl/vertical.css +35 -0
  151. package/src/{css/components/form/success.css → padding/core/all.css} +21 -8
  152. package/src/padding/core/bottom.css +27 -0
  153. package/src/padding/core/end.css +27 -0
  154. package/src/padding/core/horizontal.css +33 -0
  155. package/src/padding/core/start.css +27 -0
  156. package/src/padding/core/top.css +27 -0
  157. package/src/padding/core/vertical.css +33 -0
  158. package/src/padding/lg/all.css +29 -0
  159. package/src/padding/lg/bottom.css +29 -0
  160. package/src/padding/lg/end.css +29 -0
  161. package/src/padding/lg/horizontal.css +35 -0
  162. package/src/padding/lg/start.css +29 -0
  163. package/src/padding/lg/top.css +29 -0
  164. package/src/padding/lg/vertical.css +35 -0
  165. package/src/padding/md/all.css +29 -0
  166. package/src/padding/md/bottom.css +29 -0
  167. package/src/padding/md/end.css +29 -0
  168. package/src/padding/md/horizontal.css +35 -0
  169. package/src/padding/md/start.css +29 -0
  170. package/src/padding/md/top.css +29 -0
  171. package/src/padding/md/vertical.css +35 -0
  172. package/src/padding/sm/all.css +29 -0
  173. package/src/padding/sm/bottom.css +29 -0
  174. package/src/padding/sm/end.css +29 -0
  175. package/src/padding/sm/horizontal.css +35 -0
  176. package/src/padding/sm/start.css +29 -0
  177. package/src/padding/sm/top.css +29 -0
  178. package/src/padding/sm/vertical.css +35 -0
  179. package/src/padding/xl/all.css +29 -0
  180. package/src/padding/xl/bottom.css +29 -0
  181. package/src/padding/xl/end.css +29 -0
  182. package/src/padding/xl/horizontal.css +34 -0
  183. package/src/padding/xl/start.css +29 -0
  184. package/src/padding/xl/top.css +29 -0
  185. package/src/padding/xl/vertical.css +35 -0
  186. package/src/reset/reset.css +47 -0
  187. package/src/{css/utils/background/background.css → size/core/size.css} +7 -1
  188. package/src/size/lg/size.css +13 -0
  189. package/src/size/md/size.css +13 -0
  190. package/src/{css/components/content/content.css → size/sm/size.css} +7 -12
  191. package/src/size/xl/size.css +13 -0
  192. package/src/spacing/spacing.css +15 -0
  193. package/src/{css/components/footer/footer.css → typography/align.css} +4 -3
  194. package/src/typography/transform.css +15 -0
  195. package/src/{css/components/form/label.css → typography/weight.css} +5 -5
  196. package/gulp/config.js +0 -41
  197. package/gulp/css.js +0 -147
  198. package/gulp/utilities.js +0 -150
  199. package/gulpfile.js +0 -37
  200. package/src/css/base/README.md +0 -12
  201. package/src/css/base/base.css +0 -145
  202. package/src/css/base/code.css +0 -36
  203. package/src/css/base/forms.css +0 -67
  204. package/src/css/base/index.css +0 -7
  205. package/src/css/base/print.css +0 -77
  206. package/src/css/base/tables.css +0 -38
  207. package/src/css/base/typography.css +0 -270
  208. package/src/css/components/arrange/arrange.css +0 -157
  209. package/src/css/components/arrange/index.css +0 -1
  210. package/src/css/components/breadcrumb/index.css +0 -1
  211. package/src/css/components/button/README.md +0 -88
  212. package/src/css/components/button/button.css +0 -142
  213. package/src/css/components/button/index.css +0 -1
  214. package/src/css/components/constrain/README.md +0 -65
  215. package/src/css/components/constrain/constrain.css +0 -162
  216. package/src/css/components/constrain/image.css +0 -29
  217. package/src/css/components/constrain/index.css +0 -2
  218. package/src/css/components/container/README.md +0 -28
  219. package/src/css/components/container/container.css +0 -48
  220. package/src/css/components/container/index.css +0 -1
  221. package/src/css/components/content/index.css +0 -1
  222. package/src/css/components/flexembed/README.md +0 -65
  223. package/src/css/components/flexembed/flexembed.css +0 -82
  224. package/src/css/components/flexembed/index.css +0 -1
  225. package/src/css/components/footer/index.css +0 -1
  226. package/src/css/components/form/error.css +0 -21
  227. package/src/css/components/form/index.css +0 -6
  228. package/src/css/components/form/selectmenu.css +0 -92
  229. package/src/css/components/form/textinput.css +0 -60
  230. package/src/css/components/grid/README.md +0 -107
  231. package/src/css/components/grid/grid.css +0 -150
  232. package/src/css/components/grid/index.css +0 -1
  233. package/src/css/components/header/index.css +0 -1
  234. package/src/css/components/image/README.md +0 -66
  235. package/src/css/components/image/caption.css +0 -13
  236. package/src/css/components/image/image.css +0 -59
  237. package/src/css/components/image/index.css +0 -3
  238. package/src/css/components/image/wrapper.css +0 -44
  239. package/src/css/components/index.css +0 -17
  240. package/src/css/components/list/README.md +0 -36
  241. package/src/css/components/list/columns.css +0 -42
  242. package/src/css/components/list/index.css +0 -2
  243. package/src/css/components/list/list.css +0 -162
  244. package/src/css/components/media/README.md +0 -43
  245. package/src/css/components/media/index.css +0 -1
  246. package/src/css/components/media/media.css +0 -161
  247. package/src/css/components/message/index.css +0 -1
  248. package/src/css/components/message/message.css +0 -42
  249. package/src/css/components/navigation/README.md +0 -110
  250. package/src/css/components/navigation/dropdown.css +0 -165
  251. package/src/css/components/navigation/footer.css +0 -59
  252. package/src/css/components/navigation/index.css +0 -7
  253. package/src/css/components/navigation/mainnav.css +0 -73
  254. package/src/css/components/navigation/responsive-overlay.css +0 -129
  255. package/src/css/components/navigation/responsive-pushdown.css +0 -131
  256. package/src/css/components/navigation/sidebar.css +0 -44
  257. package/src/css/components/navigation/small-screen-button.css +0 -99
  258. package/src/css/components/pagination/index.css +0 -1
  259. package/src/css/components/pagination/pagination.css +0 -41
  260. package/src/css/components/triangle/README.md +0 -22
  261. package/src/css/components/triangle/index.css +0 -1
  262. package/src/css/components/triangle/triangle.css +0 -59
  263. package/src/css/config.css +0 -18
  264. package/src/css/main.css +0 -4
  265. package/src/css/utils/align/align.css +0 -26
  266. package/src/css/utils/align/index.css +0 -1
  267. package/src/css/utils/background/index.css +0 -1
  268. package/src/css/utils/content/content.css +0 -11
  269. package/src/css/utils/content/index.css +0 -1
  270. package/src/css/utils/display/display-responsive.css +0 -52
  271. package/src/css/utils/display/display.css +0 -71
  272. package/src/css/utils/display/index.css +0 -2
  273. package/src/css/utils/flex/flex-responsive.css +0 -759
  274. package/src/css/utils/flex/flex.css +0 -253
  275. package/src/css/utils/flex/index.css +0 -2
  276. package/src/css/utils/image/image.css +0 -27
  277. package/src/css/utils/image/index.css +0 -1
  278. package/src/css/utils/index.css +0 -16
  279. package/src/css/utils/layout/index.css +0 -1
  280. package/src/css/utils/layout/layout.css +0 -71
  281. package/src/css/utils/link/index.css +0 -1
  282. package/src/css/utils/link/link.css +0 -95
  283. package/src/css/utils/margin/gutters.css +0 -120
  284. package/src/css/utils/margin/index.css +0 -21
  285. package/src/css/utils/margin/marg-bottom-lg.css +0 -35
  286. package/src/css/utils/margin/marg-bottom-md.css +0 -35
  287. package/src/css/utils/margin/marg-bottom-sm.css +0 -35
  288. package/src/css/utils/margin/marg-bottom.css +0 -34
  289. package/src/css/utils/margin/marg-left-lg.css +0 -35
  290. package/src/css/utils/margin/marg-left-md.css +0 -35
  291. package/src/css/utils/margin/marg-left-sm.css +0 -35
  292. package/src/css/utils/margin/marg-left.css +0 -34
  293. package/src/css/utils/margin/marg-right-lg.css +0 -35
  294. package/src/css/utils/margin/marg-right-md.css +0 -35
  295. package/src/css/utils/margin/marg-right-sm.css +0 -35
  296. package/src/css/utils/margin/marg-right.css +0 -34
  297. package/src/css/utils/margin/marg-top-lg.css +0 -35
  298. package/src/css/utils/margin/marg-top-md.css +0 -35
  299. package/src/css/utils/margin/marg-top-sm.css +0 -35
  300. package/src/css/utils/margin/marg-top.css +0 -34
  301. package/src/css/utils/margin/spaced-lg.css +0 -41
  302. package/src/css/utils/margin/spaced-md.css +0 -41
  303. package/src/css/utils/margin/spaced-sm.css +0 -41
  304. package/src/css/utils/margin/spaced.css +0 -40
  305. package/src/css/utils/padding/gutters-lg.css +0 -40
  306. package/src/css/utils/padding/gutters-md.css +0 -40
  307. package/src/css/utils/padding/gutters-sm.css +0 -40
  308. package/src/css/utils/padding/gutters.css +0 -39
  309. package/src/css/utils/padding/index.css +0 -28
  310. package/src/css/utils/padding/pad-bottom-lg.css +0 -35
  311. package/src/css/utils/padding/pad-bottom-md.css +0 -35
  312. package/src/css/utils/padding/pad-bottom-sm.css +0 -35
  313. package/src/css/utils/padding/pad-bottom.css +0 -34
  314. package/src/css/utils/padding/pad-left-lg.css +0 -35
  315. package/src/css/utils/padding/pad-left-md.css +0 -35
  316. package/src/css/utils/padding/pad-left-sm.css +0 -35
  317. package/src/css/utils/padding/pad-left.css +0 -33
  318. package/src/css/utils/padding/pad-right-lg.css +0 -35
  319. package/src/css/utils/padding/pad-right-md.css +0 -35
  320. package/src/css/utils/padding/pad-right-sm.css +0 -35
  321. package/src/css/utils/padding/pad-right.css +0 -33
  322. package/src/css/utils/padding/pad-top-lg.css +0 -35
  323. package/src/css/utils/padding/pad-top-md.css +0 -35
  324. package/src/css/utils/padding/pad-top-sm.css +0 -35
  325. package/src/css/utils/padding/pad-top.css +0 -34
  326. package/src/css/utils/padding/spaced-lg.css +0 -41
  327. package/src/css/utils/padding/spaced-md.css +0 -41
  328. package/src/css/utils/padding/spaced-sm.css +0 -41
  329. package/src/css/utils/padding/spaced.css +0 -40
  330. package/src/css/utils/position/index.css +0 -1
  331. package/src/css/utils/position/position.css +0 -28
  332. package/src/css/utils/pull/index.css +0 -4
  333. package/src/css/utils/pull/pull-lg.css +0 -130
  334. package/src/css/utils/pull/pull-md.css +0 -130
  335. package/src/css/utils/pull/pull-sm.css +0 -130
  336. package/src/css/utils/pull/pull.css +0 -122
  337. package/src/css/utils/push/index.css +0 -4
  338. package/src/css/utils/push/push-lg.css +0 -130
  339. package/src/css/utils/push/push-md.css +0 -130
  340. package/src/css/utils/push/push-sm.css +0 -130
  341. package/src/css/utils/push/push.css +0 -122
  342. package/src/css/utils/radius/index.css +0 -1
  343. package/src/css/utils/radius/radius.css +0 -35
  344. package/src/css/utils/size/height.css +0 -25
  345. package/src/css/utils/size/index.css +0 -6
  346. package/src/css/utils/size/size-lg.css +0 -184
  347. package/src/css/utils/size/size-md.css +0 -184
  348. package/src/css/utils/size/size-sm.css +0 -184
  349. package/src/css/utils/size/size-xs.css +0 -184
  350. package/src/css/utils/size/size.css +0 -182
  351. package/src/css/utils/size/width.css +0 -25
  352. package/src/css/utils/typography/index.css +0 -4
  353. package/src/css/utils/typography/typography-lg.css +0 -17
  354. package/src/css/utils/typography/typography-md.css +0 -17
  355. package/src/css/utils/typography/typography-sm.css +0 -17
  356. package/src/css/utils/typography/typography.css +0 -241
@@ -1,65 +0,0 @@
1
- # Constrain
2
-
3
- Constrains an image of unknown size to the specified aspect ratio.
4
- The image is potentially cropped using the specified gravity.
5
- Similar to `FlexEmbed` but meant to be used specifically with images.
6
-
7
- This method will be used until the `object-fit` and `object-position`
8
- properties are well supported. <http://caniuse.com/#feat=object-fit>
9
-
10
- Basic visual tests are in [`test/modules/constrain.html`](http://aptuitiv.github.io/cacao/test/modules/constrain.html).
11
-
12
-
13
- ## Available classes
14
-
15
- * `Constrain`: The base component.
16
- * `Constrain--contain`: Contains the image within the ratio rather than filling
17
- the ratio and potentially cropping.
18
- * `Constrain--5by4`: The modifier class for 5:4 aspect ratio image.
19
- * `Constrain--4by3`: The modifier class for 4:3 aspect ratio image.
20
- * `Constrain--3by2`: The modifier class for 3:2 aspect ratio image,
21
- * `Constrain--8by5` / `Constrain--16by10`: The modifier class for 8:5/16:10
22
- aspect ratio image.
23
- * `Constrain--16by9`: The modifier class for 16:9 aspect ratio image.
24
- * `Constrain--top`: Sets the image to gravitate towards the top edge.
25
- * `Constrain--bottom`: Sets the image to gravitate towards the bottom edge.
26
- * `Constrain--left`: Sets the image to gravitate towards the left edge.
27
- * `Constrain--right`: Sets the image to gravitate towards the right edge.
28
- * `Constrain--topLeft`: Sets the image to gravitate towards the top left
29
- corner.
30
- * `Constrain--topRight`: Sets the image to gravitate towards the top right
31
- corner.
32
- * `Constrain--bottomLeft`: Sets the image to gravitate towards the bottom
33
- left corner.
34
- * `Constrain--bottomRight`: Sets the image to gravitate towards the bottom
35
- right corner.
36
-
37
-
38
- ## Usage
39
-
40
- The image must be applied to the element via the `background-image` property,
41
- either by applying a custom class or using inline styles.
42
-
43
- ```html
44
- <div class="Constrain Constrain--16by9" style="background-image: url('...');"></div>
45
- ```
46
-
47
- You can add custom aspect ratios. For example, to create a 2.35:1 aspect
48
- ratio:
49
-
50
- ```css
51
- /**
52
- * Modifier: 47:20 aspect ratio
53
- */
54
-
55
- .Constrain--47by20 {
56
- padding-bottom: 42.55%;
57
- }
58
- ```
59
-
60
- Alternatively, aspect ratios can be calculated programmatically and the
61
- corresponding `padding-bottom` value applied using an inline style.
62
-
63
- ```html
64
- <div class="Constrain Constrain--16by9" style="background-image: url('...'); padding-bottom: 42.55%;"></div>
65
- ```
@@ -1,162 +0,0 @@
1
- /* ==========================================================================
2
- Constrain
3
- ========================================================================== */
4
-
5
- /** @define Constrain */
6
-
7
- /**
8
- * Constrains an image of unknown size to the specified aspect ratio.
9
- * The image is potentially cropped using the specified gravity.
10
- * Similar to FlexEmbed but meant to be used specifically with images.
11
- *
12
- * This method will be used until the `object-fit` and `object-position`
13
- * properties are well supported. http://caniuse.com/#feat=object-fit
14
- */
15
-
16
- /**
17
- * Constrained image container
18
-
19
- * Apply `background-image` inline or with another class.
20
- * Constrain ratio is set to 1:1 by default. Use a modifier to change it.
21
- * Gravity is set to center by default. Use a modifier to change it.
22
- */
23
-
24
- .Constrain {
25
- background-position: center;
26
- background-repeat: no-repeat;
27
- background-size: cover;
28
- display: block;
29
- padding-bottom: 100%;
30
- width: 100%;
31
- }
32
-
33
- /**
34
- * Contain images instead of cropping them to fit
35
- */
36
-
37
- .Constrain--contain {
38
- background-size: contain;
39
- }
40
-
41
- /* Square constrain ratio
42
- ========================================================================== */
43
-
44
- .Constrain--1by1 {
45
- padding-bottom: 100%;
46
- }
47
-
48
- /* Landscape constrain ratios
49
- ========================================================================== */
50
-
51
- .Constrain--5by4 {
52
- padding-bottom: 80%;
53
- }
54
-
55
- .Constrain--4by3 {
56
- padding-bottom: 75%;
57
- }
58
-
59
- .Constrain--3by2 {
60
- padding-bottom: 66.66667%;
61
- }
62
-
63
- .Constrain--8by5,
64
- .Constrain--16by10 {
65
- padding-bottom: 62.5%;
66
- }
67
-
68
- .Constrain--5by3 {
69
- padding-bottom: 60%;
70
- }
71
-
72
- .Constrain--16by9 {
73
- padding-bottom: 56.25%;
74
- }
75
-
76
- .Constrain--2by1 {
77
- padding-bottom: 50%;
78
- }
79
-
80
- .Constrain--3by1 {
81
- padding-bottom: 33.333333%;
82
- }
83
-
84
- /* Portrait constrain ratios
85
- ========================================================================== */
86
-
87
- .Constrain--4by5 {
88
- padding-bottom: 125%;
89
- }
90
-
91
- .Constrain--3by4 {
92
- padding-bottom: 133.333333%;
93
- }
94
-
95
- .Constrain--2by3 {
96
- padding-bottom: 150%;
97
- }
98
-
99
- .Constrain--5by8,
100
- .Constrain--10by16 {
101
- padding-bottom: 160%;
102
- }
103
-
104
- .Constrain--3by5 {
105
- padding-bottom: 166.666666%;
106
- }
107
-
108
- .Constrain--9by16 {
109
- padding-bottom: 177.777777%;
110
- }
111
-
112
- .Constrain--1by2 {
113
- padding-bottom: 200%;
114
- }
115
-
116
- .Constrain--1by3 {
117
- padding-bottom: 300%;
118
- }
119
-
120
- /* Crop gravities
121
- ========================================================================== */
122
-
123
- /**
124
- * Gravitate towards edge
125
- */
126
-
127
- .Constrain--top {
128
- background-position: top center;
129
- }
130
-
131
- .Constrain--bottom {
132
- background-position: bottom center;
133
- }
134
-
135
- .Constrain--left {
136
- background-position: left center;
137
- }
138
-
139
- .Constrain--right {
140
- background-position: right center;
141
- }
142
-
143
- /**
144
- * Gravitate towards corner
145
- */
146
-
147
- .Constrain--topLeft {
148
- background-position: top left;
149
- }
150
-
151
- .Constrain--topRight {
152
- background-position: top right;
153
- }
154
-
155
- .Constrain--bottomLeft {
156
- background-position: bottom left;
157
- }
158
-
159
- .Constrain--bottomRight {
160
- background-position: bottom right;
161
- }
162
-
@@ -1,29 +0,0 @@
1
- /* =========================================================================== *\
2
- Image constrain
3
- \* =========================================================================== */
4
-
5
- /**
6
- * Constrains an image of unknown size to the specified aspect ratio.
7
- *
8
- * Used in combination with .Constrain classes. An example would be:
9
- * <div class="ImageConstrain Constrain--16by9"><img src="/my/image/here"></div>
10
- */
11
-
12
- /** @define ImageConstrain */
13
-
14
- .ImageConstrain {
15
- display: block;
16
- position: relative;
17
- width: 100%;
18
- }
19
-
20
- /* postcss-bem-linter: ignore */
21
- .ImageConstrain img {
22
- height: 100%;
23
- image-orientation: none;
24
- left: 0;
25
- object-fit: cover;
26
- position: absolute;
27
- top: 0;
28
- width: 100%;
29
- }
@@ -1,2 +0,0 @@
1
- @import './constrain';
2
- @import './image';
@@ -1,28 +0,0 @@
1
- # Container
2
-
3
- Page content container.
4
-
5
- Basic visual tests are in [`test/modules/container.html`](http://aptuitiv.github.io/cacao/test/modules/container.html).
6
-
7
-
8
- ## Available classes
9
-
10
- * `Container`: The base component.
11
- * `Container--fixedWidth`: Fix the width of the component so that it is no
12
- longer fluid
13
- * `Container--alignLeft`: Align component to the left.
14
- * `Container--alignRight`: Align component to the right.
15
-
16
-
17
- ## Configurable variables
18
-
19
- * `--Container-width`: Width of the component.
20
-
21
-
22
- ## Usage
23
-
24
- ```html
25
- <div class="Container">
26
- <!-- child content -->
27
- </div>
28
- ```
@@ -1,48 +0,0 @@
1
- /* ==========================================================================
2
- Container
3
- ========================================================================== */
4
-
5
- /** @define Container */
6
-
7
- /**
8
- * Used as a page container that will keep it's content constrained to a
9
- * certain width.
10
- */
11
-
12
- :root {
13
- --Container-width: 1200px;
14
- }
15
-
16
- /**
17
- * Fluid and centered by default.
18
- */
19
-
20
- .Container {
21
- margin-left: auto;
22
- margin-right: auto;
23
- max-width: var(--Container-width);
24
- }
25
-
26
- /**
27
- * Modifier: Non-fluid, fixed container
28
- */
29
-
30
- .Container--widthFixed {
31
- width: var(--Container-width);
32
- }
33
-
34
- /**
35
- * Modifier: Position container to the left
36
- */
37
-
38
- .Container--alignLeft {
39
- margin-left: 0;
40
- }
41
-
42
- /**
43
- * Modifier: Position container to the right
44
- */
45
-
46
- .Container--alignRight {
47
- margin-right: 0;
48
- }
@@ -1 +0,0 @@
1
- @import './container';
@@ -1 +0,0 @@
1
- @import './content';
@@ -1,65 +0,0 @@
1
- # FlexEmbed
2
-
3
- CSS for responsive, intrinsic ratio embeds.
4
-
5
- Basic visual tests are in [`test/modules/flexembed.html`](http://aptuitiv.github.io/cacao/test/modules/flexembed.html).
6
-
7
-
8
- ## Available classes
9
-
10
- * `FlexEmbed`: The root node.
11
- * `FlexEmbed-ratio`: The element that provides the aspect ratio (1:1 by default).
12
- * `FlexEmbed-ratio--3by1`: The modifier class for 3:1 aspect ratio embed.
13
- * `FlexEmbed-ratio--2by1`: The modifier class for 2:1 aspect ratio embed,
14
- * `FlexEmbed-ratio--16by9`: The modifier class for 16:9 aspect ratio embed.
15
- * `FlexEmbed-ratio--4by3`: The modifier class for 4:3 aspect ratio embed.
16
- * `FlexEmbed-content`: The descendent class for the content that is being displayed.
17
-
18
-
19
- ## Usage
20
-
21
- Example:
22
-
23
- ```html
24
- <div class="FlexEmbed">
25
- <div class="FlexEmbed-ratio FlexEmbed-ratio--16by9"></div>
26
- <iframe class="FlexEmbed-content" src="..."></iframe>
27
- </div>
28
- ```
29
-
30
- If the child content has a width and height of 100% you can also nest it within
31
- `FlexEmbed-content`.
32
-
33
- ```html
34
- <div class="FlexEmbed">
35
- <div class="FlexEmbed-ratio FlexEmbed-ratio--16by9"></div>
36
- <div class="FlexEmbed-content">
37
- <!-- child content -->
38
- </div>
39
- </div>
40
- ```
41
-
42
- You can add custom aspect ratios. For example, to create a 2.35:1 aspect
43
- ratio:
44
-
45
- ```css
46
- /**
47
- * Modifier: 47:20 aspect ratio
48
- */
49
-
50
- .FlexEmbed-ratio--47by20 {
51
- padding-bottom: 42.55%;
52
- }
53
- ```
54
-
55
- Alternatively, aspect ratios can be calculated programmatically and the
56
- corresponding `padding-bottom` value applied using an inline style.
57
-
58
- ```html
59
- <div class="FlexEmbed">
60
- <div class="FlexEmbed-ratio" style="padding-bottom:{{percentage}}%"></div>
61
- <div class="FlexEmbed-content">
62
- <!-- child content -->
63
- </div>
64
- </div>
65
- ```
@@ -1,82 +0,0 @@
1
- /* ==========================================================================
2
- FlexEmbed
3
- ========================================================================== */
4
-
5
- /** @define FlexEmbed */
6
-
7
- /**
8
- * Responsive, intrinsic ratio embeds
9
- *
10
- * For use with media embeds – such as videos or slideshows that need to
11
- * retain a specific aspect ratio but adapt to the width of their containing
12
- * element.
13
- *
14
- * Based on: http://alistapart.com/article/creating-intrinsic-ratios-for-video
15
- */
16
-
17
- .FlexEmbed {
18
- display: block;
19
- overflow: hidden;
20
- position: relative;
21
- }
22
-
23
- /**
24
- * The aspect-ratio hack is applied to an empty element because it allows
25
- * the component to respect `max-height`. Default aspect ratio is 1:1.
26
- */
27
-
28
- .FlexEmbed-ratio {
29
- display: block;
30
- padding-bottom: 100%;
31
- width: 100%;
32
- }
33
-
34
- /**
35
- * Modifiers: aspect ratios
36
- */
37
-
38
- .FlexEmbed-ratio--5by4 {
39
- padding-bottom: 80%;
40
- }
41
-
42
- .FlexEmbed-ratio--4by3 {
43
- padding-bottom: 75%;
44
- }
45
-
46
- .FlexEmbed-ratio--3by2 {
47
- padding-bottom: 66.66667%;
48
- }
49
-
50
- .FlexEmbed-ratio--8by5,
51
- .FlexEmbed-ratio--16by10 {
52
- padding-bottom: 62.5%;
53
- }
54
-
55
- .FlexEmbed-ratio--5by3 {
56
- padding-bottom: 60%;
57
- }
58
-
59
- .FlexEmbed-ratio--16by9 {
60
- padding-bottom: 56.25%;
61
- }
62
-
63
- .FlexEmbed-ratio--2by1 {
64
- padding-bottom: 50%;
65
- }
66
-
67
- .FlexEmbed-ratio--3by1 {
68
- padding-bottom: 33.333333%;
69
- }
70
-
71
- /**
72
- * Fit the content to the aspect ratio
73
- */
74
-
75
- .FlexEmbed-content {
76
- bottom: 0;
77
- height: 100%;
78
- left: 0;
79
- position: absolute;
80
- top: 0;
81
- width: 100%;
82
- }
@@ -1 +0,0 @@
1
- @import './flexembed';
@@ -1 +0,0 @@
1
- @import './footer';
@@ -1,21 +0,0 @@
1
- /* =========================================================================== *\
2
- FORM ERROR MESSAGE
3
- \* =========================================================================== */
4
-
5
- /** @define FormError */
6
-
7
- .FormError {
8
- background: #da3e37;
9
- border-radius: 4px;
10
- color: #fff;
11
- margin-bottom: 30px;
12
- padding: 20px;
13
- }
14
-
15
- .FormError-list {
16
-
17
- }
18
-
19
- .FormError-listItem {
20
- margin: 6px 10px;
21
- }
@@ -1,6 +0,0 @@
1
- @import './error.css';
2
- @import './label.css';
3
- @import './required.css';
4
- @import './selectmenu.css';
5
- @import './success.css';
6
- @import './textinput.css';
@@ -1,92 +0,0 @@
1
- /* ==========================================================================
2
- SelectInput
3
- ========================================================================== */
4
-
5
- /** @define SelectInput; weak */
6
-
7
- /**
8
- * Provides custom styles for select menu input fields.
9
- * Any <select> that is a child of a `.SelectInput` element will be styled.
10
- */
11
-
12
- :root {
13
- --SelectInput-background: #fff;
14
- --SelectInput-border: 1px solid #777;
15
- --SelectInput-color: inherit;
16
- --SelectInput-errorColor: #f00;
17
- --SelectInput-successColor: #0f0;
18
- }
19
-
20
- /**
21
- * Field wrapper that theme is applied to
22
- */
23
-
24
- .SelectInput {
25
- background: var(--SelectInput-background);
26
- border: var(--SelectInput-border);
27
- color: var(--SelectInput-color);
28
- display: inline-block;
29
- outline: none;
30
- position: relative;
31
- }
32
-
33
- /**
34
- * Dropdown arrow element
35
- */
36
-
37
- .SelectInput::before {
38
- background: none;
39
- border: 6px solid;
40
- border-color: #777 transparent transparent transparent;
41
- content: '';
42
- height: 0;
43
- padding: 0;
44
- position: absolute;
45
- right: .6rem;
46
- top: 50%;
47
- transform: translateY(-25%);
48
- width: 0;
49
- }
50
-
51
- /**
52
- * 1. Select input reset
53
- * 2. Appear above the `.SelectInput::before` element to allow for clicking.
54
- */
55
-
56
- .SelectInput > select {
57
- appearance: none; /* 1 */
58
- background: transparent; /* 1 */
59
- border: 0; /* 1 */
60
- display: block;
61
- font-family: inherit;
62
- margin: 0; /* 1 */
63
- outline: 0; /* 1 */
64
- padding: 0 2.3rem 0 .35rem;
65
- position: relative; /* 2 */
66
- width: 100%;
67
- }
68
-
69
- /**
70
- * If you set a specific color for the select text above then
71
- * some browsers (Chrome on Windows) will keep that select color. That could
72
- * be problematic if you set the text color to white. This sets the text color back
73
- * to a readable color when the field has focus.
74
- */
75
-
76
- .SelectInput > select:focus {
77
- color: #333;
78
- }
79
-
80
- /**
81
- * UI states
82
- */
83
-
84
- .SelectInput.is-invalid {
85
- color: var(--SelectInput-errorColor);
86
- outline: 1px solid var(--SelectInput-errorColor);
87
- }
88
-
89
- .SelectInput.is-valid {
90
- color: var(--SelectInput-successColor);
91
- outline: 1px solid var(--SelectInput-successColor);
92
- }
@@ -1,60 +0,0 @@
1
- /* ==========================================================================
2
- TextInput
3
- ========================================================================== */
4
-
5
- /** @define TextInput */
6
-
7
- /**
8
- * Provides custom styling for text input fields and textareas
9
- */
10
-
11
- :root {
12
- --TextInput-background: #fff;
13
- --TextInput-border: 1px solid #777;
14
- --TextInput-padding: .25em .5em;
15
- --TextInput-color: inherit;
16
- --TextInput-errorColor: #f00;
17
- --TextInput-successColor: #0f0;
18
- }
19
-
20
- .TextInput {
21
- background: var(--TextInput-background);
22
- border: var(--TextInput-border);
23
- border-radius: 0;
24
- color: var(--TextInput-color);
25
- outline: none;
26
- padding: var(--TextInput-padding);
27
- }
28
-
29
- /**
30
- * UI states
31
- */
32
-
33
- .TextInput.is-invalid {
34
- color: var(--TextInput-errorColor);
35
- outline: 1px solid var(--TextInput-errorColor);
36
- }
37
-
38
- .TextInput.is-valid {
39
- color: var(--TextInput-successColor);
40
- outline: 1px solid var(--TextInput-successColor);
41
- }
42
-
43
- /**
44
- * Sizes
45
- */
46
-
47
- /* postcss-bem-linter: ignore */
48
- .TextInput.small {
49
- width: 40%;
50
- }
51
-
52
- /* postcss-bem-linter: ignore */
53
- .TextInput.medium {
54
- width: 60%;
55
- }
56
-
57
- /* postcss-bem-linter: ignore */
58
- .TextInput.large {
59
- width: 100%;
60
- }