jsfmt.spec.js.snap 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`grid.css 1`] = `
  3. /* quotes */
  4. div {
  5. grid-template-areas:
  6. 'header header'
  7. 'main sidebar'
  8. 'footer footer';
  9. }
  10. /* numbers */
  11. div {
  12. grid-template-columns:
  13. [full-start] minmax(1.50em, 1fr)
  14. [main-start] minmax(.40ch, 75ch)
  15. [main-end] minmax(1em, 1.000fr)
  16. [full-end];
  17. }
  18. /* casing */
  19. div {
  20. GRID:
  21. [top] 1fr
  22. [middle] 1fr
  23. bottom;
  24. grid-TEMPLATE:
  25. "a a a" 200px
  26. "b b b" 200px
  27. / 200px 200px auto;
  28. }
  29. /* break before first line if there are any breaks */
  30. div {
  31. grid-template-columns:
  32. 1fr 100px 3em;
  33. grid: [wide-start] "header header header" 200px [wide-end]
  34. "footer footer footer" 25px
  35. / auto 50px auto;
  36. }
  37. /**
  38. * https://github.com/prettier/prettier/issues/2703#issuecomment-341188126
  39. */
  40. .container {
  41. display: grid;
  42. /* basic template rows/columns */
  43. grid-template-columns: 1fr 100px 3em;
  44. grid-template-rows: 1fr 100px 3em;
  45. /* template rows/columns with named grid lines */
  46. grid-template-columns:
  47. [wide-start] 1fr
  48. [main-start] 500px
  49. [main-end] 1fr
  50. [wide-end];
  51. grid-template-rows:
  52. [top] 1fr
  53. [middle] 1fr
  54. [bottom];
  55. /* template rows/columns with functions */
  56. grid-template-columns: minmax(1em, 1fr) minmax(1em, 80ch) minmax(1em, 1fr);
  57. /* getting really busy with named lines + functions */
  58. grid-template-columns:
  59. [full-start] minmax(1em, 1fr)
  60. [main-start] minmax(1em, 80ch)
  61. [main-end] minmax(1em, 1fr)
  62. [full-end];
  63. grid-template-areas:
  64. "header header header"
  65. "main main sidebar"
  66. "main main sidebar2"
  67. "footer footer footer";
  68. /* Shorthand for grid-template-rows, grid-template-columns, and grid-template
  69. areas. In one. This can get really crazy. */
  70. grid-template:
  71. [row1-start] "header header header" 25px [row1-end]
  72. [row2-start] "footer footer footer" 25px [row2-end]
  73. / auto 50px auto;
  74. /* The. Worst. This one is shorthand for like everything here smashed into one. But rarely will you actually specify EVERYTHING. */
  75. grid:
  76. [row1-start] "header header header" 25px [row1-end]
  77. [row2-start] "footer footer footer" 25px [row2-end]
  78. / auto 50px auto;
  79. /* simpler use case: */
  80. grid: 200px auto / 1fr auto 1fr;
  81. /* Okay, the the worst of it. The simpler syntaxes: */
  82. grid-row-gap: 2em;
  83. grid-column-gap: 1em;
  84. /* shorthand for grid-row-gap + grid-column-gap: */
  85. grid-gap: 2em 1em;
  86. grid-auto-columns: 1fr;
  87. grid-auto-rows: 1fr;
  88. }
  89. .container > .item {
  90. grid-column-start: 1;
  91. grid-column-end: 2;
  92. grid-row-start: -2;
  93. grid-row-end: -1;
  94. /* shorthands for the above: */
  95. grid-column: 1 / 2;
  96. grid-column: main;
  97. grid-row: -2 / span 1;
  98. grid-row: footer;
  99. grid-area: main;
  100. grid-area: 1 / main-start / 3 / main-end;
  101. }
  102. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  103. /* quotes */
  104. div {
  105. grid-template-areas:
  106. "header header"
  107. "main sidebar"
  108. "footer footer";
  109. }
  110. /* numbers */
  111. div {
  112. grid-template-columns:
  113. [full-start] minmax(1.5em, 1fr)
  114. [main-start] minmax(0.4ch, 75ch)
  115. [main-end] minmax(1em, 1fr)
  116. [full-end];
  117. }
  118. /* casing */
  119. div {
  120. grid:
  121. [top] 1fr
  122. [middle] 1fr
  123. bottom;
  124. grid-template:
  125. "a a a" 200px
  126. "b b b" 200px
  127. / 200px 200px auto;
  128. }
  129. /* break before first line if there are any breaks */
  130. div {
  131. grid-template-columns: 1fr 100px 3em;
  132. grid:
  133. [wide-start] "header header header" 200px [wide-end]
  134. "footer footer footer" 25px
  135. / auto 50px auto;
  136. }
  137. /**
  138. * https://github.com/prettier/prettier/issues/2703#issuecomment-341188126
  139. */
  140. .container {
  141. display: grid;
  142. /* basic template rows/columns */
  143. grid-template-columns: 1fr 100px 3em;
  144. grid-template-rows: 1fr 100px 3em;
  145. /* template rows/columns with named grid lines */
  146. grid-template-columns:
  147. [wide-start] 1fr
  148. [main-start] 500px
  149. [main-end] 1fr
  150. [wide-end];
  151. grid-template-rows:
  152. [top] 1fr
  153. [middle] 1fr
  154. [bottom];
  155. /* template rows/columns with functions */
  156. grid-template-columns: minmax(1em, 1fr) minmax(1em, 80ch) minmax(1em, 1fr);
  157. /* getting really busy with named lines + functions */
  158. grid-template-columns:
  159. [full-start] minmax(1em, 1fr)
  160. [main-start] minmax(1em, 80ch)
  161. [main-end] minmax(1em, 1fr)
  162. [full-end];
  163. grid-template-areas:
  164. "header header header"
  165. "main main sidebar"
  166. "main main sidebar2"
  167. "footer footer footer";
  168. /* Shorthand for grid-template-rows, grid-template-columns, and grid-template
  169. areas. In one. This can get really crazy. */
  170. grid-template:
  171. [row1-start] "header header header" 25px [row1-end]
  172. [row2-start] "footer footer footer" 25px [row2-end]
  173. / auto 50px auto;
  174. /* The. Worst. This one is shorthand for like everything here smashed into one. But rarely will you actually specify EVERYTHING. */
  175. grid:
  176. [row1-start] "header header header" 25px [row1-end]
  177. [row2-start] "footer footer footer" 25px [row2-end]
  178. / auto 50px auto;
  179. /* simpler use case: */
  180. grid: 200px auto / 1fr auto 1fr;
  181. /* Okay, the the worst of it. The simpler syntaxes: */
  182. grid-row-gap: 2em;
  183. grid-column-gap: 1em;
  184. /* shorthand for grid-row-gap + grid-column-gap: */
  185. grid-gap: 2em 1em;
  186. grid-auto-columns: 1fr;
  187. grid-auto-rows: 1fr;
  188. }
  189. .container > .item {
  190. grid-column-start: 1;
  191. grid-column-end: 2;
  192. grid-row-start: -2;
  193. grid-row-end: -1;
  194. /* shorthands for the above: */
  195. grid-column: 1 / 2;
  196. grid-column: main;
  197. grid-row: -2 / span 1;
  198. grid-row: footer;
  199. grid-area: main;
  200. grid-area: 1 / main-start / 3 / main-end;
  201. }
  202. `;