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.

338 lines
14 KiB

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/crispy.css">
  10. <style>
  11. .container {
  12. max-width: 992px;
  13. width: 100%;
  14. margin: 0 auto;
  15. }
  16. .panel {
  17. padding: 10px;
  18. background-color: #efefef;
  19. border: 1px dotted #cecece;
  20. }
  21. .header {
  22. padding: 8px 0 0;
  23. background-color: #e9e9e9;
  24. border-bottom: 1px dotted #959595;
  25. margin: 0 0 50px;
  26. }
  27. .header__logo {
  28. width: 45px;
  29. }
  30. .footer {
  31. padding: 8px 0 0;
  32. background-color: #e9e9e9;
  33. border-top: 1px dotted #959595;
  34. margin: 50px 0 0 0;
  35. }
  36. </style>
  37. </head>
  38. <body>
  39. <header id="header" class="header">
  40. <div class="container">
  41. <div class="grid">
  42. <div class="col-12">
  43. <div class="text-center">
  44. <h1 class="header__title">
  45. <svg class="icon header__logo" alt="chip" viewBox="0 0 100 100">
  46. <use xlink:href="/svg/icons.svg#chip" />
  47. </svg>
  48. Crispy Boilerplate - small, simple, pure CSS
  49. </h1>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. </header>
  55. <a class="button button--up" href="#header">
  56. <svg class="icon" alt="up" viewBox="0 0 100 100">
  57. <use xlink:href="/svg/icons.svg#triangle-up" />
  58. </svg>
  59. </a>
  60. <div class="container">
  61. <div class="grid">
  62. <div class="col-2">
  63. <nav>
  64. <ul class="margin-top-0x">
  65. <li><a href="#typography">Typography</a></li>
  66. <li><a href="#icon">Icon</a></li>
  67. <li><a href="#buttons">Buttons</a></li>
  68. <li><a href="#table">Table</a></li>
  69. <li><a href="#helpers">Helpers</a></li>
  70. <li><a href="#functions">Functions</a></li>
  71. <li><a href="#reflex-grid">Reflex Grid</a></li>
  72. </ul>
  73. </nav>
  74. </div>
  75. <div class="col-10">
  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. <h2 id="typography">Typography</h2>
  95. <!-- blockquote -->
  96. <h3 class="h4 margin-top-1x">Heading</h3>
  97. <h4 class="h6">Html:</h4>
  98. <pre class="code"><code>&lt;h2&gt;&lt;/h2&gt;
  99. &lt;h2 class="h3"&gt;&lt;/h2&gt;</code></pre>
  100. <h4 class="h6">Sass:</h4>
  101. <pre class="code"><code>$crispy__heading__font-sizes: (
  102. 'h1': 40px,
  103. 'h2': 36px,
  104. 'h3': 32px,
  105. 'h4': 28px,
  106. 'h5': 24px,
  107. 'h6': 20px
  108. ) !default;</code></pre>
  109. <h1>Heading h1</h1>
  110. <h2>Heading h1</h2>
  111. <h3>Heading h1</h3>
  112. <h4>Heading h1</h4>
  113. <h5>Heading h1</h5>
  114. <h6>Heading h1</h6>
  115. <strong>Strong</strong>
  116. <!-- blockquote -->
  117. <h3 class="h4 margin-top-1x">blockquote</h3>
  118. <h4 class="h6">Html:</h4>
  119. <pre class="code"><code>&lt;blockquote&gt;&lt;/blockquote&gt;</code></pre>
  120. <blockquote>
  121. 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.
  122. </blockquote>
  123. <!-- abbr -->
  124. <h3 class="h4 margin-top-1x">abbr</h3>
  125. <h4 class="h6">Html:</h4>
  126. <pre class="code"><code>&lt;abbr title=&quot;&quot;&gt;&lt;/abbr&gt;</code></pre>
  127. <p>
  128. Glossier viral occupy mixtape pok pok cornhole, <abbr title="vape affogato hella">vape affogato hella</abbr> knausgaard thundercats
  129. </p>
  130. <!-- list -->
  131. <h3 class="h4 margin-top-1x">Lists</h3>
  132. <h4 class="h6">Html:</h4>
  133. <pre class="code"><code>&lt;ul&gt;
  134. &lt;li&gt;item 1&lt;/li&gt;
  135. &lt;li&gt;
  136. item 2
  137. &lt;ul&gt;
  138. &lt;li&gt;child item 1&lt;/li&gt;
  139. &lt;li&gt;child item 2&lt;/li&gt;
  140. &lt;/ul&gt;
  141. &lt;/li&gt;
  142. &lt;/ul&gt;
  143. &lt;ol&gt;
  144. &lt;li&gt;item 1&lt;/li&gt;
  145. &lt;li&gt;item 2&lt;/li&gt;
  146. &lt;/ol&gt;
  147. &lt;dl&gt;
  148. &lt;dt&gt;defined title 1&lt;/dt&gt;
  149. &lt;dd&gt;defined item 1&lt;/dd&gt;
  150. &lt;/dl&gt;</code></pre>
  151. <ul>
  152. <li>item 1</li>
  153. <li>
  154. item 2
  155. <ul>
  156. <li>child item 1</li>
  157. <li>child item 2</li>
  158. </ul>
  159. </li>
  160. </ul>
  161. <ol>
  162. <li>item 1</li>
  163. <li>item 2</li>
  164. </ol>
  165. <dl>
  166. <dt>defined title 1</dt><dd>defined item 1</dd>
  167. </dl>
  168. <hr>
  169. <h2 id="buttons" class="margin-top-1x">Buttons</h2>
  170. <button class="button">Default</button>
  171. <button class="button button--secondary">Default</button>
  172. <button class="button button--success">Success</button>
  173. <button class="button button--warning">Warning</button>
  174. <button class="button button--danger">Danger</button>
  175. <button class="button button--info">Info</button>
  176. <button class="button button--info button--wide margin-top-1x">Info</button>
  177. <pre class="code"><code class="margin-top-1x margin-bottom-1x">&lt;button class=&quot;button button--danger&quot;&gt;&lt;/button&gt;
  178. &lt;button class=&quot;button button--success&quot;&gt;&lt;/button&gt;
  179. &lt;button class=&quot;button button--warning&quot;&gt;&lt;/button&gt;
  180. &lt;button class=&quot;button button--danger&quot;&gt;&lt;/button&gt;
  181. &lt;button class=&quot;button button--up&quot;&gt;&lt;/button&gt;
  182. &lt;button class=&quot;button button--down&quot;&gt;&lt;/button&gt;</code></pre>
  183. <hr>
  184. <h2 id="table" class="margin-top-1x">Table</h2>
  185. <pre class="code"><code>&lt;table class=&quot;table table--striped&quot;&gt;
  186. &lt;thead&gt;
  187. &lt;tr&gt;
  188. &lt;th&gt;&lt;/th&gt;
  189. &lt;/tr&gt;
  190. &lt;/thead&gt;
  191. &lt;tbody&gt;
  192. &lt;tr&gt;
  193. &lt;td&gt;&lt;/td&gt;
  194. &lt;/tr&gt;
  195. &lt;/tbody&gt;
  196. &lt;/table&gt;</code></pre>
  197. <table class="table table--striped margin-bottom-2x">
  198. <thead>
  199. <tr>
  200. <th>name</th>
  201. <th>age</th>
  202. </tr>
  203. </thead>
  204. <tbody>
  205. <tr>
  206. <td>Mr. Brown</td>
  207. <td>43</td>
  208. </tr>
  209. <tr>
  210. <td>Mr. Magenta</td>
  211. <td>32</td>
  212. </tr>
  213. <tr>
  214. <td>Mr. White</td>
  215. <td>45</td>
  216. </tr>
  217. </tbody>
  218. </table>
  219. <hr />
  220. <!-- helpers -->
  221. <h2 id="helpers" class="margin-top-1x">
  222. Helpers
  223. </h2>
  224. <!-- -->
  225. <h3 class="h4 margin-top-1x">
  226. Media
  227. </h3>
  228. <pre class="code"><code>&lt;img class=&quot;img-responsive&quot; src=&quot;https://picsum.photos/400&quot; /&gt;
  229. &lt;img class=&quot;img-fit-cover&quot; style=&quot;width: 100%; height: 200px;&quot; src=&quot;https://picsum.photos/400&quot;/&gt;
  230. &lt;img class=&quot;img-fit-contain&quot; style=&quot;width: 100%; height: 200px;&quot; src=&quot;https://picsum.photos/400&quot;/&gt;</code></pre>
  231. <div class="grid">
  232. <div class="col-6">
  233. <img class="img-responsive" src="https://picsum.photos/400" />
  234. </div>
  235. <div class="col-6">
  236. <img class="img-fit-cover" style="width: 100%; height: 200px;" src="https://picsum.photos/400" />
  237. </div>
  238. <div class="col-6">
  239. <img class="img-fit-contain" style="width: 100%; height: 200px;" src="https://picsum.photos/400" />
  240. </div>
  241. </div>
  242. <pre class="code"><code>&lt;figure&gt;
  243. &lt;img class=&quot;img-responsive&quot; src=&quot;https://picsum.photos/400&quot; /&gt;
  244. &lt;figcaption class=&quot;text-center&quot;&gt;Lorem Ipsum&lt;/figcaption&gt;
  245. &lt;/figure&gt;</code></pre>
  246. <div class="grid">
  247. <div class="col-6">
  248. <figure>
  249. <img class="img-responsive" src="https://picsum.photos/400" />
  250. <figcaption class="text-center">Lorem Ipsum</figcaption>
  251. </figure>
  252. </div>
  253. </div>
  254. <!-- Reflex Grid -->
  255. <hr />
  256. <h2 id="reflex-grid" class="margin-top-1x">
  257. Reflex Grid
  258. </h2>
  259. <p>
  260. The <strong>Reflex Grid</strong> is from <a target="_blank" href="http://lendmeyourear.net">Lee Jordan</a>. I have
  261. build a few helper for media-queries. <strong>Reflex Grid </strong> is lightweight, simple and uses a flexbox grid with
  262. cross browser support, an inline-block fallback.
  263. </p>
  264. <p>
  265. Documentation: <a target="_blank" href="http://reflexgrid.com/docs/">http://reflexgrid.com/docs/</a><br />
  266. Github: <a target="_blank" href="https://github.com/leejordan/reflex">https://github.com/leejordan/reflex</a>
  267. </p>
  268. <!-- Reflex Grid / media queries -->
  269. <h3 class="h4 margin-top-1x">
  270. Media Queries
  271. </h3>
  272. <p>
  273. For Media Queries uses the Breakpoints from the <strong>Reflex Grid</strong>.
  274. </p>
  275. <ul>
  276. <li>xs: 576px</li>
  277. <li>sm: 768px</li>
  278. <li>md: 992px</li>
  279. <li>lg: 1200px</li>
  280. <li>xlg: 1600px</li>
  281. </ul>
  282. <p>
  283. You can uses a Mixin to add styles to an Breakpoint.If you want
  284. that a style only belong to one Breakpoints "-only", otherwise it is
  285. Mobile First.
  286. </p>
  287. <h4 class="h6">
  288. Sass:
  289. </h4>
  290. <pre class="code"><code class="margin-bottom-1x">@include crispy__media-md() {
  291. &lt;!-- your code --&gt;
  292. }
  293. @include crispy__media-md-only() {
  294. &lt;!-- your code --&gt;
  295. }</code></pre>
  296. </div>
  297. </div>
  298. </div>
  299. <footer class="footer">
  300. <div class="container">
  301. <div class="grid">
  302. <div class="col-12">
  303. <div class="text-center">
  304. <p>
  305. <a target="_blank" href="https://thenounproject.com/wxchee/">W. X. Chee</a>
  306. </p>
  307. </div>
  308. </div>
  309. </div>
  310. </div>
  311. </footer>
  312. </body>
  313. </html>