Lightweight CSS Framework for Building Apps and Websites https://crispy-css.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

937 lines
38 KiB

4 years ago
  1. <!doctype html>
  2. <html class="no-js" lang="en_EN">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="x-ua-compatible" content="ie=edge">
  6. <title>Get Started | Crispy CSS</title>
  7. <meta name="description" content="Lightweight Framework for building Websites and Apps for Mobile, Tablet and Desktop. Minimal UI-Elements, Functions and Helpers.">
  8. <meta name="viewport" content="width=device-width, initial-scale=1">
  9. <link rel="stylesheet" href="styles.css">
  10. </head>
  11. <body>
  12. <header id="header" class="header header--fixed background-color-info">
  13. <div class="container">
  14. <div class="grid">
  15. <div class="col-12">
  16. <nav class="group">
  17. <ul class="group group--horizontal text-left">
  18. <li class="group__item">
  19. <a href="/" class="text-color-white text-bold">
  20. <svg class="icon text-size-mega" alt="Crispy CSS">
  21. <use xlink:href="symbol-defs.svg#icon-logo" />
  22. </svg>
  23. Crispy CSS
  24. </a>
  25. </li>
  26. <li class="group__item">
  27. <a href="#typography" class="text-color-white margin-left-3">
  28. Typography
  29. </a>
  30. </li>
  31. <li class="group__item">
  32. <a href="#components" class="text-color-white">
  33. Components
  34. </a>
  35. </li>
  36. <li class="group__item">
  37. <a href="#components" class="text-color-white">
  38. Functions
  39. </a>
  40. </li>
  41. <li class="group__item">
  42. <a href="#components" class="text-color-white">
  43. Modifiziers
  44. </a>
  45. </li>
  46. </ul>
  47. </nav>
  48. </div>
  49. </div>
  50. </div>
  51. </header>
  52. <div class="container">
  53. <div class="grid">
  54. <div class="col-12">
  55. <h1 class="h2 margin-top-4 margin-bottom-2 text-center">
  56. Get started!
  57. </h1>
  58. <h2 class="h3">Installation</h2>
  59. <pre class="code"><code>npm install crispy-css</code></pre>
  60. <h2 class="h3">How it works</h2>
  61. <h3 class="h4">SCSS</h3>
  62. <pre class="code"><code>@import
  63. "crispy";</code></pre>
  64. <p>Now include Mixins you need. Components and Modifiziers only works if you include them,</p>
  65. <pre class="code"><code>@include crispy__core();
  66. @include crispy__modifiers();
  67. // components
  68. @include crispy__button();
  69. @include crispy__code();
  70. @include crispy__field();
  71. @include crispy__group();
  72. @include crispy__hero();
  73. @include crispy__icon();
  74. @include crispy__media();
  75. @include crispy__modal();
  76. @include crispy__overlay();
  77. @include crispy__panel();
  78. @include crispy__progress();
  79. @include crispy__table();</code></pre>
  80. <p>For Custom Variables add a File before importing Crispy,</p>
  81. <pre class="code"><code>@import
  82. "config",
  83. "crispy";</code></pre>
  84. <p>If you need all, mixins will be included,</p>
  85. <pre class="code"><code>@import
  86. "crispy-all";</code></pre>
  87. <p>Only need Core and Modifiziers?</p>
  88. <pre class="code"><code>@import
  89. "crispy-minimal";</code></pre>
  90. <h3 class="h4">CSS</h3>
  91. <p>For using CSS you can use <span class="text-bold">crispy-all.css</span> for all Styles or <span class="text-bold">crispy-mininmal.css</span> without Components.</p>
  92. <h2 class="h3">Example</h2>
  93. <p>
  94. You find an example in "/src/example", this is this Documentation. In the given example there are additional directories. These ones are part of a structure which might be helpful for you.
  95. </p>
  96. <h4>Site</h4>
  97. <p>
  98. Contains header, footer, partials that are used on a site or webapp. Header and Footer are not classical components, there often more complex and have a special brand.
  99. </p>
  100. <h4>Templates</h4>
  101. <p>
  102. Templates are for a single site or a group of sites, they are complex and there is no benefit so reuse them as components.
  103. </p>
  104. <!-- typography -->
  105. <hr class="margin-top-3">
  106. <h2 id="typography" class="margin-top-1">
  107. Typography
  108. </h2>
  109. <!-- abbr -->
  110. <h3 class="h4 margin-top-2">a</h3>
  111. <h4 class="h6">Html:</h4>
  112. <pre class="code"><code>&lt;a href=&quot;&quot;&gt;&lt;/a&gt;</code></pre>
  113. <p>
  114. Color of Text is set by <strong>$crispy__color-primary</strong>. <strong>Hover</strong> is set by
  115. <strong>$crispy__color-text</strong>
  116. </p>
  117. <!-- abbr -->
  118. <h3 class="h4 margin-top-2">abbr</h3>
  119. <h4 class="h6">Html:</h4>
  120. <pre class="code"><code>&lt;abbr title=&quot;&quot;&gt;&lt;/abbr&gt;</code></pre>
  121. <p>
  122. Glossier viral occupy mixtape pok pok cornhole, <abbr title="vape affogato hella">vape affogato hella</abbr> knausgaard thundercats
  123. </p>
  124. <!-- blockquote -->
  125. <h3 class="h4 margin-top-2">blockquote</h3>
  126. <h4 class="h6">Html:</h4>
  127. <pre class="code"><code>&lt;blockquote&gt;&lt;/blockquote&gt;</code></pre>
  128. <blockquote>
  129. Hoodie kickstarter four loko, pinterest hashtag chambray glossier. Pug before they sold out etsy listicle. Deep v bespoke tacos polaroid, squid flexitarian crucifix messenger bag.
  130. </blockquote>
  131. <!-- hr -->
  132. <h3 class="h4 margin-top-2">hr</h3>
  133. <h4 class="h6">Html:</h4>
  134. <pre class="code"><code>&lt;hr&gt;</code></pre>
  135. <p>
  136. <hr>
  137. </p>
  138. <!-- paragraph -->
  139. <h3 class="h4 margin-top-2">paragraph</h3>
  140. <h4 class="h6">Html:</h4>
  141. <pre class="code"><code>&lt;p&gt;&lt;/p&gt;</code></pre>
  142. <p>
  143. Glossier viral occupy mixtape pok pok.
  144. </p>
  145. <!-- mark -->
  146. <h3 class="h4 margin-top-2">mark</h3>
  147. <h4 class="h6">Html:</h4>
  148. <pre class="code"><code>&lt;mark&gt;&lt;/mark&gt;</code></pre>
  149. <p>
  150. Pug before they <mark>four loko</mark> Deep v bespoke
  151. </p>
  152. <!-- list -->
  153. <h3 class="h4 margin-top-2">list</h3>
  154. <h4 class="h6">Html:</h4>
  155. <pre class="code"><code>&lt;ul&gt;
  156. &lt;li&gt;item 1&lt;/li&gt;
  157. &lt;li&gt;item 2
  158. &lt;ul&gt;
  159. &lt;li&gt;child item 1&lt;/li&gt;
  160. &lt;li&gt;child item 2&lt;/li&gt;
  161. &lt;/ul&gt;
  162. &lt;/li&gt;
  163. &lt;/ul&gt;
  164. &lt;ol&gt;
  165. &lt;li&gt;item 1&lt;/li&gt;
  166. &lt;li&gt;item 2&lt;/li&gt;
  167. &lt;/ol&gt;
  168. &lt;dl&gt;
  169. &lt;dt&gt;defined title 1&lt;/dt&gt;
  170. &lt;dd&gt;defined item 1&lt;/dd&gt;
  171. &lt;/dl&gt;</code></pre>
  172. <ul>
  173. <li>item 1</li>
  174. <li>
  175. item 2
  176. <ul>
  177. <li>child item 1</li>
  178. <li>child item 2</li>
  179. </ul>
  180. </li>
  181. </ul>
  182. <ol>
  183. <li>item 1</li>
  184. <li>item 2</li>
  185. </ol>
  186. <dl>
  187. <dt>defined title 1</dt>
  188. <dd>defined item 1</dd>
  189. </dl>
  190. <!-- components / heading -->
  191. <h3 class="h4 margin-top-2">
  192. Heading
  193. </h3>
  194. <h4 class="h6">Html:</h4>
  195. <pre class="code"><code>&lt;h2&gt;&lt;/h2&gt;
  196. &lt;h2 class="h3"&gt;&lt;/h2&gt;</code></pre>
  197. <h4 class="h6">Sass:</h4>
  198. <pre class="code"><code>$crispy__heading__font-sizes: (
  199. 'h1': 40px,
  200. 'h2': 36px,
  201. 'h3': 32px,
  202. 'h4': 28px,
  203. 'h5': 24px,
  204. 'h6': 20px
  205. ) !default;</code></pre>
  206. <h1>Heading h1</h1>
  207. <h2>Heading h2</h2>
  208. <h3>Heading h3</h3>
  209. <h4>Heading h4</h4>
  210. <h5>Heading h5</h5>
  211. <h6>Heading h6</h6>
  212. <!-- components -->
  213. <hr class="margin-top-3">
  214. <h2 id="components" class="margin-top-1">
  215. Components
  216. </h2>
  217. <!-- components / button -->
  218. <h3 class="h4 margin-top-2">
  219. Button
  220. </h3>
  221. <h4 class="h6">Html:</h4>
  222. <pre class="code margin-top-1"><code>&lt;button class=&quot;button&quot;&gt;&lt;/button&gt;
  223. &lt;button class=&quot;button width-100&quot;&gt;&lt;/button&gt;</code></pre>
  224. <button class="button">Default</button>
  225. <button class="button width-100 margin-top-1">Info</button>
  226. <!-- components / code -->
  227. <h3 class="h4 margin-top-2">
  228. Code
  229. </h3>
  230. <h4 class="h6">Html:</h4>
  231. <pre class="code margin-top-1"><code>&lt;pre class=&quot;code&quot;&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;</code></pre>
  232. <!-- components / group -->
  233. <h3 class="h4 margin-top-2">
  234. Group
  235. </h3>
  236. <h4 class="h6">Html:</h4>
  237. <pre class="code"><code>&lt;nav&gt;
  238. &lt;ul class=&quot;group&quot;&gt;
  239. &lt;li class=&quot;group__item&quot;&gt;first item&lt;/li&gt;
  240. &lt;li class=&quot;group__item&quot;&gt;second item&lt;/li&gt;
  241. &lt;li class=&quot;group__item&quot;&gt;third item&lt;/li&gt;
  242. &lt;/ul&gt;
  243. &lt;/nav&gt;</code></pre>
  244. <div class="panel panel__inner margin-bottom-1">
  245. <nav>
  246. <ul class="group">
  247. <li class="group__item">first item</li>
  248. <li class="group__item">second item</li>
  249. <li class="group__item">third item</li>
  250. </ul>
  251. </nav>
  252. </div>
  253. <h4 class="h6">Html:</h4>
  254. <pre class="code"><code>&lt;nav&gt;
  255. &lt;ul class=&quot;group group--horizontal group--separate&quot;&gt;
  256. &lt;li class=&quot;group__item&quot;&gt;first item&lt;/li&gt;
  257. &lt;li class=&quot;group__item&quot;&gt;second item&lt;/li&gt;
  258. &lt;li class=&quot;group__item&quot;&gt;third item&lt;/li&gt;
  259. &lt;/ul&gt;
  260. &lt;/nav&gt;</code></pre>
  261. <div class="panel panel__inner">
  262. <nav>
  263. <ul class="group group--horizontal group--separate">
  264. <li class="group__item">first item</li><li class="group__item">second item</li><li class="group__item">third item</li>
  265. </ul>
  266. </nav>
  267. </div>
  268. <!-- components / hero -->
  269. <h3 class="h4 margin-top-2">
  270. Hero
  271. </h3>
  272. <h4 class="h6">Html:</h4>
  273. <pre class="code"><code>&lt;div class=&quot;hero&quot; style=&quot;height: 300px; background-image: url('https://picsum.photos/1024')&quot;&gt;&lt;/div&gt;</code></pre>
  274. <div class="hero" style="height: 300px; background-image: url('https://picsum.photos/1024')"></div>
  275. <pre class="code margin-top-3"><code>&lt;div class=&quot;hero hero--top&quot; style=&quot;height: 300px; background-image: url('https://picsum.photos/1024')&quot;&gt;&lt;/div&gt;</code></pre>
  276. <div class="hero hero--top" style="height: 300px; background-image: url('https://picsum.photos/1024')"></div>
  277. <pre class="code margin-top-3"><code>&lt;div class=&quot;hero hero--bottom&quot; style=&quot;height: 300px; background-image: url('https://picsum.photos/1024')&quot;&gt;&lt;/div&gt;</code></pre>
  278. <div class="hero hero--bottom" style="height: 300px; background-image: url('https://picsum.photos/1024')"></div>
  279. <!-- icons -->
  280. <h3 class="h4 margin-top-2">
  281. Icon
  282. </h3>
  283. <p>
  284. To change Size you can use "text-size-*" that you find in the <span class="text-weight-bold">modifiers</span>.
  285. </p>
  286. <h4 class="h6">Html:</h4>
  287. <pre class="code"><code>&lt;svg class=&quot;icon text-size-small&quot;&gt;
  288. &lt;use xlink:href=&quot;symbol-defs.svg#icon-minus&quot;&gt;&lt;/use&gt;
  289. &lt;/svg&gt;</code></pre>
  290. <div class="panel">
  291. <div class="panel__inner">
  292. <svg class="icon text-size-small" aria-hidden="true">
  293. <use xlink:href="symbol-defs.svg#icon-spaceinvaders"></use>
  294. </svg>
  295. <svg class="icon" aria-hidden="true">
  296. <use xlink:href="symbol-defs.svg#icon-spaceinvaders"></use>
  297. </svg>
  298. <svg class="icon text-size-large" aria-hidden="true">
  299. <use xlink:href="symbol-defs.svg#icon-spaceinvaders"></use>
  300. </svg>
  301. <svg class="icon text-size-big" aria-hidden="true">
  302. <use xlink:href="symbol-defs.svg#icon-spaceinvaders"></use>
  303. </svg>
  304. <svg class="icon text-size-mega" aria-hidden="true">
  305. <use xlink:href="symbol-defs.svg#icon-spaceinvaders"></use>
  306. </svg>
  307. </div>
  308. </div>
  309. <div class="panel">
  310. <div class="panel__inner">
  311. <button class="button">
  312. <svg class="icon" aria-hidden="true">
  313. <use xlink:href="symbol-defs.svg#icon-spaceinvaders"></use>
  314. </svg>
  315. </button>
  316. <button class="button">
  317. <svg class="icon" aria-hidden="true">
  318. <use xlink:href="symbol-defs.svg#icon-spaceinvaders"></use>
  319. </svg>
  320. Button
  321. </button>
  322. </div>
  323. </div>
  324. <p class="margin-top-2">
  325. To change Color you can use "icon-color-*".
  326. </p>
  327. <h4 class="h6">Html:</h4>
  328. <pre class="code"><code>&lt;svg class=&quot;icon icon-color-danger&quot;&gt;
  329. &lt;use xlink:href=&quot;symbol-defs.svg#icon-minus&quot;&gt;&lt;/use&gt;
  330. &lt;/svg&gt;</code></pre>
  331. <div class="panel">
  332. <div class="panel__inner">
  333. <svg class="icon icon-color-danger" aria-hidden="true">
  334. <use xlink:href="symbol-defs.svg#icon-spaceinvaders"></use>
  335. </svg>
  336. </div>
  337. </div>
  338. <!-- components / panel -->
  339. <h3 class="h4 margin-top-2">
  340. Panel
  341. </h3>
  342. <h4 class="h6">Html:</h4>
  343. <pre class="code"><code>&lt;div class=&quot;panel&quot;&gt;
  344. &lt;div class=&quot;panel__inner&quot;&gt;
  345. Lorem Ipsum
  346. &lt;/div&gt;
  347. &lt;/div&gt;</code></pre>
  348. <div class="panel">
  349. <div class="panel__inner">
  350. Lorem Ipsum
  351. </div>
  352. </div>
  353. <!-- components / progress -->
  354. <h3 class="h4 margin-top-2">
  355. Progress
  356. </h3>
  357. <h4 class="h6">Html:</h4>
  358. <pre class="code"><code>&lt;div class=&quot;progress&quot;&gt;
  359. &lt;div class=&quot;progress__inner&quot; style=&quot;width: 80%&quot;&gt;
  360. &lt;/div&gt;
  361. &lt;/div&gt;</code></pre>
  362. <div class="progress">
  363. <div class="progress__inner" style="width: 80%">
  364. </div>
  365. </div>
  366. <!-- components / modal -->
  367. <h3 class="h4 margin-top-3">
  368. Modal
  369. </h3>
  370. <h4 class="h6">Html:</h4>
  371. <pre class="code"><code>&lt;div class=&quot;modal modal--bottom width-100&quot;&gt;
  372. &lt;div class=&quot;panel&quot;&gt;
  373. &lt;div class=&quot;panel__inner&quot;&gt;
  374. Lorem Ipsum
  375. &lt;/div&gt;
  376. &lt;/div&gt;
  377. &lt;/div&gt;</code></pre>
  378. <div style="position: relative; width: 100%; height: 200px; border: 1px dotted black;">
  379. <div class="modal modal--top-left">
  380. <div class="panel">
  381. <div class="panel__inner">
  382. .modal--top-left
  383. </div>
  384. </div>
  385. </div>
  386. <div class="modal modal--top-right">
  387. <div class="panel">
  388. <div class="panel__inner">
  389. .modal--top-right
  390. </div>
  391. </div>
  392. </div>
  393. <div class="modal">
  394. <div class="panel">
  395. <div class="panel__inner">
  396. .modal
  397. </div>
  398. </div>
  399. </div>
  400. <div class="modal modal--bottom-left">
  401. <div class="panel">
  402. <div class="panel__inner">
  403. .modal--bottom-left
  404. </div>
  405. </div>
  406. </div>
  407. <div class="modal modal--bottom-right">
  408. <div class="panel">
  409. <div class="panel__inner">
  410. .modal--bottom-right
  411. </div>
  412. </div>
  413. </div>
  414. </div>
  415. <!-- components / table -->
  416. <h3 class="h4 margin-top-2">
  417. Table
  418. </h3>
  419. <h4 class="h6">Html:</h4>
  420. <pre class="code"><code>&lt;table class=&quot;table table--striped&quot;&gt;
  421. &lt;thead&gt;
  422. &lt;tr&gt;
  423. &lt;th&gt;&lt;/th&gt;
  424. &lt;/tr&gt;
  425. &lt;/thead&gt;
  426. &lt;tbody&gt;
  427. &lt;tr&gt;
  428. &lt;td&gt;&lt;/td&gt;
  429. &lt;/tr&gt;
  430. &lt;/tbody&gt;
  431. &lt;/table&gt;</code></pre>
  432. <table class="table table--striped margin-bottom-2">
  433. <thead>
  434. <tr>
  435. <th>name</th>
  436. <th>age</th>
  437. </tr>
  438. </thead>
  439. <tbody>
  440. <tr>
  441. <td>Mr. Brown</td>
  442. <td>43</td>
  443. </tr>
  444. <tr>
  445. <td>Mr. Magenta</td>
  446. <td>32</td>
  447. </tr>
  448. <tr>
  449. <td>Mr. White</td>
  450. <td>45</td>
  451. </tr>
  452. </tbody>
  453. </table>
  454. <!-- components / field / checkbox -->
  455. <h3 class="h4 margin-top-0">
  456. Checkbox
  457. </h3>
  458. <div class="field">
  459. <input id="field__checkbox__1" class="field__choice" type="checkbox" name="field__checkbox__1" value="true" />
  460. <label for="field__checkbox__1" class="field__label">
  461. <svg class="icon field__choice__unchecked" aria-hidden="true">
  462. <use xlink:href="symbol-defs.svg#icon-minus"></use>
  463. </svg>
  464. <svg class="icon field__choice__checked" aria-hidden="true">
  465. <use xlink:href="symbol-defs.svg#icon-checked"></use>
  466. </svg>
  467. checkbox 1
  468. </label>
  469. <input id="field__checkbox__2" class="field__choice" type="checkbox" name="field__checkbox__2" value="true" />
  470. <label for="field__checkbox__2" class="field__label">
  471. <svg class="icon field__choice__unchecked" aria-hidden="true">
  472. <use xlink:href="symbol-defs.svg#icon-minus"></use>
  473. </svg>
  474. <svg class="icon field__choice__checked" aria-hidden="true">
  475. <use xlink:href="symbol-defs.svg#icon-checked"></use>
  476. </svg>
  477. checkbox 2
  478. </label>
  479. </div>
  480. <div class="field field--error">
  481. <input id="field__checkbox__3" class="field__choice" type="checkbox" name="field__checkbox__3" value="true" />
  482. <label for="field__checkbox__3" class="field__label">
  483. <svg class="icon field__choice__unchecked" aria-hidden="true">
  484. <use xlink:href="symbol-defs.svg#icon-minus"></use>
  485. </svg>
  486. <svg class="icon field__choice__checked" aria-hidden="true">
  487. <use xlink:href="symbol-defs.svg#icon-checked"></use>
  488. </svg>
  489. checkbox 1
  490. </label>
  491. <div class="field__panel">
  492. error item 1
  493. </div>
  494. </div>
  495. <!-- components / field / radio -->
  496. <h3 class="h4 margin-top-0">
  497. Radio
  498. </h3>
  499. <div class="field">
  500. <input id="field__radio__1" class="field__choice" type="radio" name="field__radio__1[]" value="true" />
  501. <label for="field__radio__1" class="field__label">
  502. <svg class="icon field__choice__unchecked" aria-hidden="true">
  503. <use xlink:href="symbol-defs.svg#icon-minus"></use>
  504. </svg>
  505. <svg class="icon field__choice__checked" aria-hidden="true">
  506. <use xlink:href="symbol-defs.svg#icon-checked" />
  507. </svg>
  508. radio item 1
  509. </label><br />
  510. <input id="field__radio__2" class="field__choice" type="radio" name="field__radio__1[]" value="true" />
  511. <label for="field__radio__2" class="field__label">
  512. <svg class="icon field__choice__unchecked" aria-hidden="true">
  513. <use xlink:href="symbol-defs.svg#icon-minus"></use>
  514. </svg>
  515. <svg class="icon field__choice__checked" aria-hidden="true">
  516. <use xlink:href="symbol-defs.svg#icon-checked" />
  517. </svg>
  518. radio item 2
  519. </label>
  520. </div>
  521. <!-- radio / error -->
  522. <div class="field field--error">
  523. <input id="field__radio__3" class="field__choice" type="radio" name="field__radio__2[]" value="true" />
  524. <label for="field__radio__3" class="field__label">
  525. <svg class="icon field__choice__unchecked" aria-hidden="true">
  526. <use xlink:href="symbol-defs.svg#icon-minus"></use>
  527. </svg>
  528. <svg class="icon field__choice__checked" aria-hidden="true">
  529. <use xlink:href="symbol-defs.svg#icon-checked" />
  530. </svg>
  531. radio item 1
  532. </label><br />
  533. <input id="field__radio__4" class="field__choice" type="radio" name="field__radio__2[]" value="true" />
  534. <label for="field__radio__4" class="field__label">
  535. <svg class="icon field__choice__unchecked" aria-hidden="true">
  536. <use xlink:href="symbol-defs.svg#icon-minus"></use>
  537. </svg>
  538. <svg class="icon field__choice__checked" aria-hidden="true">
  539. <use xlink:href="symbol-defs.svg#icon-checked" />
  540. </svg>
  541. radio item 2
  542. </label>
  543. <div class="field__panel">
  544. error item 1
  545. </div>
  546. </div>
  547. <!-- components / field / select -->
  548. <h3 class="h4 margin-top-0xx">
  549. Select
  550. </h3>
  551. <div class="field">
  552. <label class="field__label">
  553. Select Item
  554. <select class="field__select">
  555. <option>select item 1</option>
  556. <option>select item 2</option>
  557. <option>select item 3</option>
  558. </select>
  559. </label>
  560. </div>
  561. <div class="field field--error">
  562. <label class="field__label">
  563. Select Item
  564. <select class="field__select">
  565. <option>select item 1</option>
  566. <option>select item 2</option>
  567. <option>select item 3</option>
  568. </select>
  569. <div class="field__panel">
  570. error item 1
  571. </div>
  572. </label>
  573. </div>
  574. <!-- components / field / input textarea -->
  575. <h3 class="h4 margin-top-0xx">
  576. Input / Textarea
  577. </h3>
  578. <div class="field">
  579. <input class="field__text" type="text" />
  580. </div>
  581. <div class="field field--valid">
  582. <label class="field__label">
  583. Text
  584. <input type="text" class="field__text" />
  585. </label>
  586. <div class="field__panel">
  587. error item 1
  588. </div>
  589. </div>
  590. <div class="field field--error">
  591. <label class="field__label">
  592. Text
  593. <input type="text" class="field__text" />
  594. </label>
  595. <div class="field__panel">
  596. error item 1
  597. </div>
  598. </div>
  599. <div class="field">
  600. <label class="field__label">
  601. Textarea
  602. <textarea class="field__text"></textarea>
  603. </label>
  604. </div>
  605. <div class="field field--error">
  606. <label class="field__label">
  607. Textarea
  608. <textarea class="field__text"></textarea>
  609. </label>
  610. <div class="field__panel">
  611. error item 1
  612. </div>
  613. </div>
  614. <!-- functions -->
  615. <hr class="margin-top-3">
  616. <h2 id="functions" class="margin-top-1">
  617. Functions
  618. </h2>
  619. <!-- functions / stripUnit -->
  620. <h3 class="h4 margin-top-0">
  621. stripUnit()
  622. </h3>
  623. <h4 class="h6 margin-top-1">Sass:</h4>
  624. <pre class="code"><code>stripUnit(10px);</code></pre>
  625. <p>
  626. Returns value without unit.
  627. </p>
  628. <!-- functions / zIndex -->
  629. <h3 class="h4 margin-top-0">
  630. zIndex(name)
  631. </h3>
  632. <h4 class="h6 margin-top-1">Sass:</h4>
  633. <pre class="code"><code>zIndex('modal');</code></pre>
  634. <p>
  635. Returns value from $crispy__z-index.
  636. </p>
  637. <h4 class="h6 margin-top-1">Sass:</h4>
  638. <pre class="code"><code>$crispy__z-index: (
  639. 'overlay': 90,
  640. 'modal' : 100
  641. );</code></pre>
  642. <!-- modifiers -->
  643. <hr class="margin-top-3">
  644. <h2 id="modifiers" class="margin-top-1">
  645. Modifiziers
  646. </h2>
  647. <!-- modifiers / margin & padding -->
  648. <h3 class="h4 margin-top-1">
  649. Margin & Padding
  650. </h3>
  651. <p>
  652. Adding margin-top, -left, -bottom and -right and the same for padding.
  653. </p>
  654. <h4 class="h6 margin-top-1">Sass:</h4>
  655. <pre class="code">
  656. $crispy__modifiers__spacing: 0.75em;
  657. $crispy__modifiers__spacing__steps: 6;
  658. </pre></code>
  659. <h4 class="h6 margin-top-1">Html:</h4>
  660. <pre class="code">&lt;div class=&quot;panel&quot;&gt;margin-bottom-0&lt;/div&gt;
  661. &lt;div class=&quot;margin-bottom-1&quot;&gt;margin-bottom-1&lt;/div&gt;
  662. &lt;div class=&quot;margin-bottom-2&quot;&gt;margin-bottom-2&lt;/div&gt;
  663. &lt;div class=&quot;margin-bottom-3&quot;&gt;margin-bottom-3&lt;/div&gt;
  664. &lt;div class=&quot;margin-bottom-4&quot;&gt;margin-bottom-4&lt;/div&gt;
  665. &lt;div class=&quot;margin-bottom-5&quot;&gt;margin-bottom-5&lt;/div&gt;</code></pre>
  666. <div class="panel panel__inner">margin-bottom-0</div>
  667. <div class="panel panel__inner margin-bottom-1">margin-bottom-1</div>
  668. <div class="panel panel__inner margin-bottom-2">margin-bottom-2</div>
  669. <div class="panel panel__inner margin-bottom-3">margin-bottom-3</div>
  670. <div class="panel panel__inner margin-bottom-4">margin-bottom-4</div>
  671. <div class="panel panel__inner margin-bottom-5">margin-bottom-5</div>
  672. <p>
  673. Also set padding and margin to 0,
  674. </p>
  675. <pre class="code">&lt;div class=&quot;marginless&quot;&lt;/div&gt;
  676. &lt;div class=&quot;paddingless&quot;&lt;/div&gt;</code></pre>
  677. <!-- modifiers / media -->
  678. <h3 class="h4 margin-top-1">
  679. Media
  680. </h3>
  681. <pre class="code"><code>&lt;img class=&quot;img-responsive&quot; src=&quot;https://picsum.photos/400&quot; /&gt;
  682. &lt;figure&gt;
  683. &lt;img class=&quot;img-responsive&quot; src=&quot;https://picsum.photos/400&quot; /&gt;
  684. &lt;figcaption class=&quot;text-center&quot;&gt;Lorem Ipsum&lt;/figcaption&gt;
  685. &lt;/figure&gt;
  686. &lt;div class=&quot;video-responsive&quot; style=&quot;height: 280px;&quot;&gt;
  687. &lt;iframe src=&quot;https://giphy.com/embed/13XW2MJE0XCoM0&quot; width=&quot;480&quot; height=&quot;361&quot;&gt;&lt;/iframe&gt;
  688. &lt;/div&gt;</code></pre>
  689. <div class="grid">
  690. <div class="col-6">
  691. <img class="img-responsive width-100" src="https://picsum.photos/400" />
  692. </div>
  693. <div class="col-6">
  694. <figure>
  695. <img class="img-responsive width-100" src="https://picsum.photos/400" />
  696. <figcaption class="text-center">Lorem Ipsum</figcaption>
  697. </figure>
  698. </div>
  699. </div>
  700. <!-- modifiers / Typography -->
  701. <h3 class="h4 margin-top-1">
  702. Typography
  703. </h3>
  704. <pre class="code">&lt;div class=&quot;text-left&quot;&gt;&lt;/div&gt;
  705. &lt;div class=&quot;text-center&quot;&gt;&lt;/div&gt;
  706. &lt;div class=&quot;text-right&quot;&gt;&lt;/div&gt;
  707. &lt;div class=&quot;text-justify&quot;&gt;&lt;/div&gt;
  708. &lt;div class=&quot;text-italic&quot;&gt;&lt;/div&gt;
  709. &lt;div class=&quot;text-light&quot;&gt;&lt;/div&gt;
  710. &lt;div class=&quot;text-normal&quot;&gt;&lt;/div&gt;
  711. &lt;div class=&quot;text-medium&quot;&gt;&lt;/div&gt;
  712. &lt;div class=&quot;text-bold&quot;&gt;&lt;/div&gt;
  713. &lt;div class=&quot;text-capitalize&quot;&gt;&lt;/div&gt;
  714. &lt;div class=&quot;text-uppercase&quot;&gt;&lt;/div&gt;
  715. &lt;div class=&quot;text-lowercase&quot;&gt;&lt;/div&gt;
  716. &lt;div class=&quot;text-smaller&quot;&gt;&lt;/div&gt;
  717. &lt;div class=&quot;text-crossed&quot;&gt;&lt;/div&gt;
  718. &lt;div class=&quot;text-underline&quot;&gt;&lt;/div&gt;</code></pre>
  719. <p>
  720. Also there are classes for,
  721. </p>
  722. <ul>
  723. <li>text-size-* with $crispy__font-sizes for "font-size"</li>
  724. <li>text-color-* with $crispy__colors for "color"</li>
  725. <li>background-color-* with $crispy__font-sizes for "background-color"</li>
  726. </ul>
  727. <!-- modifiers / float -->
  728. <h3 class="h4 margin-top-1">
  729. Float
  730. </h3>
  731. <pre class="code">&lt;div class=&quot;float-left&quot;&gt;&lt;/div&gt;
  732. &lt;div class=&quot;float-right&quot;&gt;&lt;/div&gt;
  733. &lt;div class=&quot;float-none&quot;&gt;&lt;/div&gt;
  734. &lt;div class=&quot;centered&quot;&gt;&lt;/div&gt;
  735. &lt;div class=&quot;clearfix&quot;&gt;&lt;/div&gt;</code></pre>
  736. <!-- modifiers / typography -->
  737. <h3 class="h4 margin-top-1">
  738. Position
  739. </h3>
  740. <pre class="code">&lt;div class=&quot;relative&quot;&gt;&lt;/div&gt;
  741. &lt;div class=&quot;absolute&quot;&gt;&lt;/div&gt;
  742. &lt;div class=&quot;fixed&quot;&gt;&lt;/div&gt;</code></pre>
  743. <!-- modifiers / border -->
  744. <h3 class="h4 margin-top-1">
  745. Border
  746. </h3>
  747. <pre class="code">&lt;div class=&quot;bordered&quot;&gt;&lt;/div&gt;
  748. &lt;div class=&quot;rounded&quot;&gt;&lt;/div&gt;
  749. &lt;div class=&quot;borderless&quot;&gt;&lt;/div&gt;
  750. &lt;div class=&quot;radiusless&quot;&gt;&lt;/div&gt;</code></pre>
  751. <!-- modifiers / visibility -->
  752. <h3 class="h4 margin-top-1">
  753. Visibility
  754. </h3>
  755. <pre class="code">&lt;div class=&quot;hidden&quot;&gt;&lt;/div&gt;
  756. &lt;div class=&quot;visible&quot;&gt;&lt;/div&gt;
  757. &lt;div class=&quot;visible visible--inline&quot;&gt;&lt;/div&gt;
  758. &lt;div class=&quot;visible visible--inline-block&quot;&gt;&lt;/div&gt;</code></pre>
  759. <!-- modifiers / width -->
  760. <h3 class="h4 margin-top-1">
  761. Width
  762. </h3>
  763. <h4 class="h6 margin-top-1">Sass:</h4>
  764. <pre class="code"><code>$crispy__width: (
  765. '25' : 25%,
  766. '50' : 50%,
  767. '75' : 75%,
  768. '100': 100%
  769. )</code></pre>
  770. <h4 class="h6 margin-top-1">Html:</h4>
  771. <pre class="code"><code>&lt;div class=&quot;panel width-25&quot;&gt;width-25&lt;/div&gt;
  772. &lt;div class=&quot;width-50&quot;&gt;width-50&lt;/div&gt;
  773. &lt;div class=&quot;width-75&quot;&gt;width-75&lt;/div&gt;
  774. &lt;div class=&quot;width-100&quot;&gt;width-100&lt;/div&gt;</code></pre>
  775. <div class="panel panel__inner width-25 margin-bottom-1">width-25</div>
  776. <div class="panel panel__inner width-50 margin-bottom-1">width-50</div>
  777. <div class="panel panel__inner width-75 margin-bottom-1">width-75</div>
  778. <div class="panel panel__inner width-100 margin-bottom-1">width-100</div>
  779. <!-- mixins -->
  780. <hr class="margin-top-3">
  781. <h2 id="mixins" class="margin-top-1">
  782. Mixins
  783. </h2>
  784. <!-- mixins / triangle -->
  785. <h3 class="h4 margin-top-1">
  786. Triangle
  787. </h3>
  788. <h4 class="h6 margin-top-1">Sass:</h4>
  789. <pre class="code"><code>.triangle-left, .triangle-right, .triangle-top, .triangle-bottom {
  790. display: block;
  791. }
  792. .triangle-left {
  793. @include triangle('left', $crispy__color-primary);
  794. }
  795. .triangle-right {
  796. @include triangle('right', $crispy__color-primary);
  797. }
  798. .triangle-top {
  799. @include triangle('top', $crispy__color-primary);
  800. }
  801. .triangle-bottom {
  802. @include triangle('bottom', $crispy__color-primary);
  803. }
  804. </code></pre>
  805. <p>
  806. <span class="triangle-right"></span>
  807. <span class="triangle-left"></span>
  808. <span class="triangle-top"></span>
  809. <span class="triangle-bottom"></span>
  810. </p>
  811. <!-- mixins / media-queries -->
  812. <h3 class="h4 margin-top-1">
  813. Media Queries
  814. </h3>
  815. <p>
  816. These <strong>@mixins</strong> were used with the Breakpoints from <a target="_blank" href="http://reflexgrid.com/docs/">http://reflexgrid.com/docs/</a>.
  817. Reflex-Grid is also used as grid for this Site.
  818. </p>
  819. <ul>
  820. <li><strong>xs</strong> 576px</li>
  821. <li><strong>sm</strong> 768px</li>
  822. <li><strong>md</strong> 992px</li>
  823. <li><strong>lg</strong> 1200px</li>
  824. <li><strong>xlg</strong> 1600px</li>
  825. </ul>
  826. <h4 class="h6 margin-top-1">Html:</h4>
  827. <pre class="code"><code>&lt;div class=&quot;sm&quot;&gt;sm&lt;/div&gt;
  828. &lt;div class=&quot;md&quot;&gt;md&lt;/div&gt;
  829. &lt;div class=&quot;md-only&quot;&gt;md-only&lt;/div&gt;
  830. &lt;div class=&quot;lg-only&quot;&gt;lg-only&lt;/div&gt;</pre></code>
  831. <h4 class="h6 margin-top-1">Sass:</h4>
  832. <pre class="code"><code>.sm, .md, .md-only, .lg-only {
  833. display: none;
  834. }
  835. .sm {
  836. @include crispy__media-sm() {
  837. display: block;
  838. }
  839. }
  840. .md {
  841. @include crispy__media-md() {
  842. display: block;
  843. }
  844. }
  845. .md-only {
  846. @include crispy__media-md-only() {
  847. display: block;
  848. }
  849. }
  850. .lg-only {
  851. @include crispy__media-lg-only() {
  852. display: block;
  853. }
  854. }</code></pre>
  855. <div class="grid">
  856. <div class="col-3">
  857. <div class="panel panel__inner sm margin-bottom-1">sm</div>
  858. </div>
  859. <div class="col-3">
  860. <div class="panel panel__inner md margin-bottom-1">md</div>
  861. </div>
  862. <div class="col-3">
  863. <div class="panel panel__inner md-only margin-bottom-1">md-only</div>
  864. </div>
  865. <div class="col-3">
  866. <div class="panel panel__inner lg-only margin-bottom-1">lg-only</div>
  867. </div>
  868. </div>
  869. </div>
  870. </div>
  871. </div>
  872. </body