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.

554 lines
17 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 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></title>
  7. <meta name="description" content="">
  8. <meta name="viewport" content="width=device-width, initial-scale=1">
  9. <link rel="stylesheet" href="/css/styles.min.css">
  10. <style>
  11. .container {
  12. max-width: 992px;
  13. width: 100%;
  14. margin: 0 auto;
  15. }
  16. .header {
  17. padding: 8px 0 0;
  18. background-color: #e9e9e9;
  19. border-bottom: 1px dotted #959595;
  20. margin: 0 0 50px;
  21. }
  22. .header__logo {
  23. width: 45px;
  24. }
  25. .footer {
  26. padding: 8px 0 0;
  27. background-color: #e9e9e9;
  28. border-top: 1px dotted #959595;
  29. margin: 50px 0 0 0;
  30. }
  31. </style>
  32. </head>
  33. <body>
  34. <header id="header" class="header">
  35. <div class="container">
  36. <div class="grid">
  37. <div class="col-12">
  38. <div class="text-center">
  39. <hgroup>
  40. <h1 class="header__title">
  41. <svg class="icon header__logo" alt="Crisp" viewBox="0 0 100 100">
  42. <use xlink:href="/svg/icons.svg#chip" />
  43. </svg>
  44. Crispy Boilerplate - Flat Sass Boilerplate
  45. </h1>
  46. </hgroup>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. </header>
  52. <a class="button button--up" href="#header">
  53. <svg class="icon" alt="up" viewBox="0 0 100 100">
  54. <use xlink:href="/svg/icons.svg#triangle-up" />
  55. </svg>
  56. </a>
  57. <div class="container">
  58. <div class="grid">
  59. <div class="col-2">
  60. <nav>
  61. <ul class="margin-top-0x">
  62. <li><a href="#components">Components</a></li>
  63. <li><a href="#functions">Functions</a></li>
  64. <li><a href="#helpers">Helpers</a></li>
  65. <li><a href="#mixins">Mixins</a></li>
  66. <li><a href="#reflex-grid">Reflex Grid</a></li>
  67. </ul>
  68. </nav>
  69. </div>
  70. <div class="col-10">
  71. <p>
  72. Why? There are so many! Yes, of Course, but this is not
  73. a Framework, it is a Boilerplate, more simple. I have tried
  74. to build a minimalistic sass.
  75. </p>
  76. <p>
  77. A few Years a have always created Styles to use in other Frameworks, crispy boilerplate is a
  78. a small toolkit from this helpers, styles that can be used to create. This is not beatiful or fancy
  79. it is a simple and basic toolkit to get a default style.
  80. </p>
  81. <p>
  82. For me it was important to use no js, not that i hate js, no, the Problem of bigger Frameworks was
  83. but for the most webapps, it was always diffult to build a few things and not getting a conflict. So i desided
  84. it is simpler to get a good stable basis and build smaller parts
  85. </p>
  86. <p>
  87. So this is a smaller approch, most projects i have then that
  88. big Frameworks were used, but i often felt that there
  89. was a Problem, often the fight against the framework, that
  90. result often in bigger and longer code.
  91. This is also a try to code get a smaller base to create more effecit
  92. No, it is a try, i can not promise you it will be done,
  93. </p>
  94. <!-- npm -->
  95. <hr>
  96. <h2>
  97. npm
  98. </h2>
  99. <p>
  100. </p>
  101. <!-- how to use -->
  102. <hr>
  103. <h2>
  104. How to use
  105. </h2>
  106. <!-- components -->
  107. <hr>
  108. <h2 id="typography" class="margin-top-1x">
  109. Typography
  110. </h2>
  111. <!-- blockquote -->
  112. <h3 class="h4 margin-top-2x margin-bottom-0x">blockquote</h3>
  113. <h4 class="h6">Html:</h4>
  114. <pre class="code"><code>&lt;blockquote&gt;&lt;/blockquote&gt;</code></pre>
  115. <blockquote>
  116. 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.
  117. </blockquote>
  118. <!-- abbr -->
  119. <h3 class="h4 margin-top-2x margin-bottom-0x">>abbr</h3>
  120. <h4 class="h6">Html:</h4>
  121. <pre class="code"><code>&lt;abbr title=&quot;&quot;&gt;&lt;/abbr&gt;</code></pre>
  122. <p>
  123. Glossier viral occupy mixtape pok pok cornhole, <abbr title="vape affogato hella">vape affogato hella</abbr> knausgaard thundercats
  124. </p>
  125. <!-- list -->
  126. <h3 class="h4 margin-top-2x margin-bottom-0x">>Lists</h3>
  127. <h4 class="h6">Html:</h4>
  128. <pre class="code"><code>&lt;ul&gt;
  129. &lt;li&gt;item 1&lt;/li&gt;
  130. &lt;li&gt;
  131. item 2
  132. &lt;ul&gt;
  133. &lt;li&gt;child item 1&lt;/li&gt;
  134. &lt;li&gt;child item 2&lt;/li&gt;
  135. &lt;/ul&gt;
  136. &lt;/li&gt;
  137. &lt;/ul&gt;
  138. &lt;ol&gt;
  139. &lt;li&gt;item 1&lt;/li&gt;
  140. &lt;li&gt;item 2&lt;/li&gt;
  141. &lt;/ol&gt;
  142. &lt;dl&gt;
  143. &lt;dt&gt;defined title 1&lt;/dt&gt;
  144. &lt;dd&gt;defined item 1&lt;/dd&gt;
  145. &lt;/dl&gt;</code></pre>
  146. <ul>
  147. <li>item 1</li>
  148. <li>
  149. item 2
  150. <ul>
  151. <li>child item 1</li>
  152. <li>child item 2</li>
  153. </ul>
  154. </li>
  155. </ul>
  156. <ol>
  157. <li>item 1</li>
  158. <li>item 2</li>
  159. </ol>
  160. <dl>
  161. <dt>defined title 1</dt><dd>defined item 1</dd>
  162. </dl>
  163. <!-- components -->
  164. <hr>
  165. <h2 id="components" class="margin-top-1x">
  166. Components
  167. </h2>
  168. <!-- components / button -->
  169. <h3 class="h4 margin-top-2x margin-bottom-0x">
  170. Button
  171. </h3>
  172. <h4 class="h6">Html:</h4>
  173. <pre class="code margin-top-1x"><code>&lt;button class=&quot;button&quot;&gt;&lt;/button&gt;
  174. &lt;button class=&quot;button button--wide&quot;&gt;&lt;/button&gt;</code></pre>
  175. <button class="button">Default</button>
  176. <button class="button button--wide margin-top-1x">Info</button>
  177. <!-- components / group -->
  178. <h3 class="h4 margin-top-2x margin-bottom-0x">
  179. Group
  180. </h3>
  181. <h4 class="h6">Html:</h4>
  182. <pre class="code"><code>&lt;nav class=&quot;group&quot;&gt;
  183. &lt;ul class=&quot;group__section&quot;&gt;
  184. &lt;li class=&quot;group__item&quot;&gt;first item&lt;/li&gt;
  185. &lt;li class=&quot;group__item&quot;&gt;second item&lt;/li&gt;
  186. &lt;li class=&quot;group__item&quot;&gt;third item&lt;/li&gt;
  187. &lt;/ul&gt;
  188. &lt;/nav&gt;</code></pre>
  189. <div class="panel panel__inner margin-bottom-1x">
  190. <nav class="group">
  191. <ul class="group__section">
  192. <li class="group__item">first item</li>
  193. <li class="group__item">second item</li>
  194. <li class="group__item">third item</li>
  195. </ul>
  196. </nav>
  197. </div>
  198. <h4 class="h6">Html:</h4>
  199. <pre class="code"><code>&lt;nav class=&quot;group group--horizontal&quot;&gt;
  200. &lt;ul class=&quot;group__section group__section--separate&quot;&gt;
  201. &lt;li class=&quot;group__item&quot;&gt;first item&lt;/li&gt;
  202. &lt;li class=&quot;group__item&quot;&gt;second item&lt;/li&gt;
  203. &lt;li class=&quot;group__item&quot;&gt;third item&lt;/li&gt;
  204. &lt;/ul&gt;
  205. &lt;/nav&gt;</code></pre>
  206. <div class="panel panel__inner">
  207. <nav class="group group--horizontal">
  208. <ul class="group__section group__section--separate">
  209. <li class="group__item">first item</li><li class="group__item">second item</li><li class="group__item">third item</li>
  210. </ul>
  211. </nav>
  212. </div>
  213. <!-- components / heading -->
  214. <h3 class="h4 margin-top-2x margin-bottom-0x">
  215. Heading
  216. </h3>
  217. <h4 class="h6">Html:</h4>
  218. <pre class="code"><code>&lt;h2&gt;&lt;/h2&gt;
  219. &lt;h2 class="h3"&gt;&lt;/h2&gt;</code></pre>
  220. <h4 class="h6">Sass:</h4>
  221. <pre class="code"><code>$crispy__heading__font-sizes: (
  222. 'h1': 40px,
  223. 'h2': 36px,
  224. 'h3': 32px,
  225. 'h4': 28px,
  226. 'h5': 24px,
  227. 'h6': 20px
  228. ) !default;</code></pre>
  229. <h1>Heading h1</h1>
  230. <h2>Heading h1</h2>
  231. <h3>Heading h1</h3>
  232. <h4>Heading h1</h4>
  233. <h5>Heading h1</h5>
  234. <h6>Heading h1</h6>
  235. <!-- components / hero -->
  236. <h3 class="h4 margin-top-2x margin-bottom-0x">
  237. Hero
  238. </h3>
  239. <h4 class="h6">Html:</h4>
  240. <pre class="code"><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>
  241. <div class="hero hero--bottom" style="height: 300px; background-image: url('https://picsum.photos/1024')"></div>
  242. <!-- components / icon -->
  243. <h3 class="h4 margin-top-2x margin-bottom-0x">
  244. Icon
  245. </h3>
  246. <h4 class="h6">Html:</h4>
  247. <pre class="code"><code>&lt;svg class=&quot;icon icon--small&quot; alt=&quot;beaker&quot; viewBox=&quot;0 0 100 100&quot;&gt;
  248. &lt;use xlink:href=&quot;/svg/icons.svg#beaker&quot; /&gt;
  249. &lt;/svg&gt;
  250. &lt;svg class=&quot;icon&quot; alt=&quot;beaker&quot; viewBox=&quot;0 0 100 100&quot;&gt;
  251. &lt;use xlink:href=&quot;/svg/icons.svg#beaker&quot; /&gt;
  252. &lt;/svg&gt;
  253. &lt;svg class=&quot;icon icon--large&quot; alt=&quot;beaker&quot; viewBox=&quot;0 0 100 100&quot;&gt;
  254. &lt;use xlink:href=&quot;/svg/icons.svg#beaker&quot; /&gt;
  255. &lt;/svg&gt;
  256. &lt;svg class=&quot;icon icon--danger&quot; alt=&quot;alert&quot; viewBox=&quot;0 0 100 100&quot;&gt;
  257. &lt;use xlink:href=&quot;/svg/icons.svg#alert&quot; /&gt;
  258. &lt;/svg&gt;
  259. </code></pre>
  260. <svg class="icon icon--small" alt="beaker" viewBox="0 0 100 100">
  261. <use xlink:href="/svg/icons.svg#beaker" />
  262. </svg>
  263. <svg class="icon" alt="beaker" viewBox="0 0 100 100">
  264. <use xlink:href="/svg/icons.svg#beaker" />
  265. </svg>
  266. <svg class="icon icon--large" alt="beaker" viewBox="0 0 100 100">
  267. <use xlink:href="/svg/icons.svg#beaker" />
  268. </svg>
  269. <svg class="icon icon--danger" alt="alert" viewBox="0 0 100 100">
  270. <use xlink:href="/svg/icons.svg#alert" />
  271. </svg>
  272. <!-- components / modal -->
  273. <h3 class="h4 margin-top-2x margin-bottom-0x">
  274. Modal
  275. </h3>
  276. <h4 class="h6">Html:</h4>
  277. <pre class="code"><code>&lt;div class=&quot;modal modal--bottom width-100&quot;&gt;
  278. &lt;div class=&quot;panel&quot;&gt;
  279. &lt;div class=&quot;panel__inner&quot;&gt;
  280. Lorem Ipsum
  281. &lt;/div&gt;
  282. &lt;/div&gt;
  283. &lt;/div&gt;</code></pre>
  284. <div style="position: relative; width: 100%; height: 200px; border: 1px dotted black;">
  285. <div class="modal modal--bottom width-100">
  286. <div class="panel">
  287. <div class="panel__inner">
  288. Lorem Ipsum
  289. </div>
  290. </div>
  291. </div>
  292. </div>
  293. <!-- components / panel -->
  294. <h3 class="h4 margin-top-2x margin-bottom-0x">
  295. Panel
  296. </h3>
  297. <h4 class="h6">Html:</h4>
  298. <pre class="code"><code>&lt;div class=&quot;panel&quot;&gt;
  299. &lt;div class=&quot;panel__inner&quot;&gt;
  300. Lorem Ipsum
  301. &lt;/div&gt;
  302. &lt;/div&gt;</code></pre>
  303. <div class="panel">
  304. <div class="panel__inner">
  305. Lorem Ipsum
  306. </div>
  307. </div>
  308. <!-- components / table -->
  309. <h3 id="table" class="h4 margin-top-2x margin-bottom-0x">
  310. Table
  311. </h3>
  312. <span class="background-warning">/components</span>
  313. <h4 class="h6 margin-top-1x">Html:</h4>
  314. <pre class="code"><code>&lt;table class=&quot;table table--striped&quot;&gt;
  315. &lt;thead&gt;
  316. &lt;tr&gt;
  317. &lt;th&gt;&lt;/th&gt;
  318. &lt;/tr&gt;
  319. &lt;/thead&gt;
  320. &lt;tbody&gt;
  321. &lt;tr&gt;
  322. &lt;td&gt;&lt;/td&gt;
  323. &lt;/tr&gt;
  324. &lt;/tbody&gt;
  325. &lt;/table&gt;</code></pre>
  326. <table class="table table--striped margin-bottom-2x">
  327. <thead>
  328. <tr>
  329. <th>name</th>
  330. <th>age</th>
  331. </tr>
  332. </thead>
  333. <tbody>
  334. <tr>
  335. <td>Mr. Brown</td>
  336. <td>43</td>
  337. </tr>
  338. <tr>
  339. <td>Mr. Magenta</td>
  340. <td>32</td>
  341. </tr>
  342. <tr>
  343. <td>Mr. White</td>
  344. <td>45</td>
  345. </tr>
  346. </tbody>
  347. </table>
  348. <!-- functions -->
  349. <hr>
  350. <h2 id="functions" class="margin-top-1x">
  351. Functions
  352. </h2>
  353. <!-- functions / toEm / toRem -->
  354. <h3 class="h4 margin-top-0x margin-bottom-0x">
  355. toEm()<br>
  356. toRem()
  357. </h3>
  358. <span class="background-warning">/functions</span>
  359. <h4 class="h6 margin-top-1x">Sass:</h4>
  360. <pre class="code"><code>toEm(5px);
  361. toEm(10px 10px 0 0);
  362. toRem(10px 10px 0 0);
  363. </code></pre>
  364. <p>
  365. Returns <strong>em</strong> and <strong>rem</strong>, accepts px and unitless values.
  366. </p>
  367. <!-- functions / stripUnit -->
  368. <h3 class="h4 margin-top-0x margin-bottom-0x">
  369. stripUnit()
  370. </h3>
  371. <span class="background-warning">/functions</span>
  372. <h4 class="h6 margin-top-1x">Sass:</h4>
  373. <pre class="code"><code>toEm(10px);</code></pre>
  374. <p>
  375. Returns value without unit.
  376. </p>
  377. <!-- helpers -->
  378. <hr class="margin-top-3x">
  379. <h2 id="helpers" class="margin-top-1x">
  380. Helpers
  381. </h2>
  382. <p>
  383. </p>
  384. <!-- helpers / align -->
  385. <h3 class="h4 margin-top-1x">
  386. Align
  387. </h3>
  388. <pre class="code">&lt;div class=&quot;text-left&quot;&gt;&lt;/div&gt;
  389. &lt;div class=&quot;text-center&quot;&gt;&lt;/div&gt;
  390. &lt;div class=&quot;text-right&quot;&gt;&lt;/div&gt;
  391. &lt;div class=&quot;text-justify&quot;&gt;&lt;/div&gt;
  392. &lt;div class=&quot;float-left&quot;&gt;&lt;/div&gt;
  393. &lt;div class=&quot;float-center&quot;&gt;&lt;/div&gt;
  394. &lt;div class=&quot;float-none&quot;&gt;&lt;/div&gt;
  395. &lt;div class=&quot;center&quot;&gt;&lt;/div&gt;
  396. &lt;div class=&quot;clearfix&quot;&gt;&lt;/div&gt;</code></pre>
  397. <!-- helpers / margin -->
  398. <h3 class="h4 margin-top-1x">
  399. Margin
  400. </h3>
  401. <p>
  402. margin-top and -bottom from <strong>$crispy__margin</strong> as px.
  403. </p>
  404. <pre class="code">&lt;div class=&quot;panel margin-bottom-0x&quot;&gt;margin-bottom-0x&lt;/div&gt;
  405. &lt;div class=&quot;margin-bottom-1x&quot;&gt;margin-bottom-1x&lt;/div&gt;
  406. &lt;div class=&quot;margin-bottom-2x&quot;&gt;margin-bottom-2x&lt;/div&gt;
  407. &lt;div class=&quot;margin-bottom-3x&quot;&gt;margin-bottom-3x&lt;/div&gt;</code></pre>
  408. <div class="panel panel__inner margin-bottom-0x">margin-bottom-0x</div>
  409. <div class="panel panel__inner margin-bottom-1x">margin-bottom-1x</div>
  410. <div class="panel panel__inner margin-bottom-2x">margin-bottom-2x</div>
  411. <div class="panel panel__inner margin-bottom-3x">margin-bottom-3x</div>
  412. <!-- helpers / media -->
  413. <h3 class="h4 margin-top-1x">
  414. Media
  415. </h3>
  416. <pre class="code"><code>&lt;img class=&quot;img-responsive&quot; src=&quot;https://picsum.photos/400&quot; /&gt;
  417. &lt;figure&gt;
  418. &lt;img class=&quot;img-responsive&quot; src=&quot;https://picsum.photos/400&quot; /&gt;
  419. &lt;figcaption class=&quot;text-center&quot;&gt;Lorem Ipsum&lt;/figcaption&gt;
  420. &lt;/figure&gt;
  421. &lt;div class=&quot;video-responsive&quot; style=&quot;height: 280px;&quot;&gt;
  422. &lt;iframe src=&quot;https://giphy.com/embed/13XW2MJE0XCoM0&quot; width=&quot;480&quot; height=&quot;361&quot;&gt;&lt;/iframe&gt;
  423. &lt;/div&gt;</code></pre>
  424. <div class="grid">
  425. <div class="col-6">
  426. <img class="img-responsive" src="https://picsum.photos/400" />
  427. </div>
  428. <div class="col-6">
  429. <figure>
  430. <img class="img-responsive" src="https://picsum.photos/400" />
  431. <figcaption class="text-center">Lorem Ipsum</figcaption>
  432. </figure>
  433. </div>
  434. </div>
  435. <div class="grid">
  436. <div class="col-6">
  437. <div class="video-responsive" style="height: 280px;">
  438. <iframe src="https://giphy.com/embed/13XW2MJE0XCoM0" width="480" height="361" frameBorder="0" class="giphy-embed" allowFullScreen></iframe>
  439. </div>
  440. </div>
  441. </div>
  442. <!-- helpers / media -->
  443. <h3 class="h4 margin-top-1x">
  444. Width
  445. </h3>
  446. <pre class="code"><code>&lt;div class=&quot;panel width-25&quot;&gt;width-25&lt;/div&gt;
  447. &lt;div class=&quot;width-50&quot;&gt;width-50&lt;/div&gt;
  448. &lt;div class=&quot;width-75&quot;&gt;width-75&lt;/div&gt;
  449. &lt;div class=&quot;width-100&quot;&gt;width-100&lt;/div&gt;</code></pre>
  450. <div class="panel panel__inner width-25 margin-bottom-1x">width-25</div>
  451. <div class="panel panel__inner width-50 margin-bottom-1x">width-50</div>
  452. <div class="panel panel__inner width-75 margin-bottom-1x">width-75</div>
  453. <div class="panel panel__inner width-100 margin-bottom-1x">width-100</div>
  454. <!-- Reflex Grid -->
  455. <hr class="margin-top-3x">
  456. <h2 id="reflex-grid" class="margin-top-1x">
  457. Reflex Grid
  458. </h2>
  459. <p>
  460. The <strong>Reflex Grid</strong> is from <a target="_blank" href="http://lendmeyourear.net">Lee Jordan</a>. I have
  461. build a few helper for media-queries. <strong>Reflex Grid </strong> is lightweight, simple and uses a flexbox grid with
  462. cross browser support, an inline-block fallback.
  463. </p>
  464. <p>
  465. Documentation: <a target="_blank" href="http://reflexgrid.com/docs/">http://reflexgrid.com/docs/</a><br />
  466. Github: <a target="_blank" href="https://github.com/leejordan/reflex">https://github.com/leejordan/reflex</a>
  467. </p>
  468. <!-- Reflex Grid / media queries -->
  469. <h3 class="h4 margin-top-2x margin-bottom-0x">
  470. Media Queries
  471. </h3>
  472. <p>
  473. For Media Queries uses the Breakpoints from the <strong>Reflex Grid</strong>.
  474. </p>
  475. <ul>
  476. <li><strong>xs</strong> 576px</li>
  477. <li><strong>sm</strong> 768px</li>
  478. <li><strong>md</strong> 992px</li>
  479. <li><strong>lg</strong> 1200px</li>
  480. <li><strong>xlg</strong> 1600px</li>
  481. </ul>
  482. <p>
  483. You can uses a Mixin to add styles to an Breakpoint.If you want
  484. that a style only belong to one Breakpoints "-only", otherwise it is
  485. Mobile First.
  486. </p>
  487. <h4 class="h6">
  488. Sass:
  489. </h4>
  490. <pre class="code"><code class="margin-bottom-1x">@include crispy__media-md() {
  491. &lt;!-- your code --&gt;
  492. }
  493. @include crispy__media-md-only() {
  494. &lt;!-- your code --&gt;
  495. }</code></pre>
  496. </div>
  497. </div>
  498. </div>
  499. <footer class="footer">
  500. <div class="container">
  501. <div class="grid">
  502. <div class="col-12">
  503. <div class="text-center">
  504. <p>
  505. <a target="_blank" href="https://thenounproject.com/wxchee/">W. X. Chee</a>
  506. </p>
  507. </div>
  508. </div>
  509. </div>
  510. </div>
  511. </footer>
  512. </body>
  513. </html>