calyx 0.17.1 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +5 -5
  2. data/docs/_data/breadcrumbs.yml +9 -0
  3. data/docs/_data/docs.yml +35 -0
  4. data/docs/_data/examples.yml +9 -0
  5. data/docs/_includes/breadcrumbs.html +36 -0
  6. data/docs/_includes/contents.html +12 -0
  7. data/docs/_includes/icon-github.html +4 -0
  8. data/docs/_includes/icon-rubygems.html +9 -0
  9. data/docs/_includes/navbar.html +24 -0
  10. data/docs/_includes/pagebar.html +12 -0
  11. data/docs/_layouts/default.html +3 -23
  12. data/docs/_layouts/docs.html +14 -0
  13. data/docs/_layouts/home.html +13 -0
  14. data/docs/_layouts/page.html +20 -0
  15. data/docs/_posts/2017-09-14-welcome-to-jekyll.markdown +1 -1
  16. data/docs/_posts/2017-09-21-0.17.0-released.md +10 -0
  17. data/docs/_styles/card.scss +7 -0
  18. data/docs/_styles/colors.scss +18 -0
  19. data/docs/_styles/content.scss +57 -0
  20. data/docs/_styles/cta.scss +25 -0
  21. data/docs/_styles/grid.scss +22 -0
  22. data/docs/_styles/media.scss +50 -0
  23. data/docs/_styles/menu.scss +54 -0
  24. data/docs/_styles/modifiers.scss +3 -0
  25. data/docs/_styles/navbar.scss +161 -0
  26. data/docs/_styles/pagebar.scss +32 -0
  27. data/docs/_styles/reset.scss +92 -0
  28. data/docs/_styles/scale.scss +23 -0
  29. data/docs/_styles/spread.scss +55 -0
  30. data/docs/_styles/styleguide.scss +52 -0
  31. data/docs/_styles/syntax.scss +84 -0
  32. data/docs/_styles/typography.scss +49 -0
  33. data/docs/_styles/yard.scss +36 -0
  34. data/docs/api.html +9662 -0
  35. data/docs/assets/calyx-docs.css +253 -162
  36. data/docs/assets/calyx-flower-outline.svg +202 -0
  37. data/docs/assets/calyx-flower-reverse.svg +202 -0
  38. data/docs/assets/calyx-flower.svg +202 -0
  39. data/docs/assets/logo-small.png +0 -0
  40. data/docs/assets/logos/calyx-flower-1.svg +22 -0
  41. data/docs/assets/logos/calyx-flower-2.svg +21 -0
  42. data/docs/content/documentation.html +20 -0
  43. data/docs/content/examples.html +12 -0
  44. data/docs/content/examples/any-gradient.md +32 -0
  45. data/docs/content/examples/faker.md +16 -0
  46. data/docs/content/examples/tiny-woodland-bot.md +24 -0
  47. data/docs/{guide → content/guides}/context.md +2 -2
  48. data/docs/{guide → content/guides}/expressions.md +2 -2
  49. data/docs/content/guides/features.md +50 -0
  50. data/docs/{guide → content/guides}/formats.md +1 -1
  51. data/docs/content/guides/installation.md +51 -0
  52. data/docs/{guide → content/guides}/random.md +1 -1
  53. data/docs/{guide → content/guides}/results.md +1 -1
  54. data/docs/content/index.html +44 -0
  55. data/docs/content/introduction.md +23 -0
  56. data/docs/content/introduction/concepts.md +82 -0
  57. data/docs/content/introduction/contributing.md +43 -0
  58. data/docs/content/introduction/tutorial.md +129 -0
  59. data/docs/content/styleguide.html +71 -0
  60. data/docs/docs.scss +94 -0
  61. data/docs/index.html +1 -23
  62. data/docs/package.json +1 -1
  63. data/lib/calyx/production/choices.rb +7 -0
  64. data/lib/calyx/production/unique.rb +0 -2
  65. data/lib/calyx/registry.rb +5 -0
  66. data/lib/calyx/rule.rb +4 -0
  67. data/lib/calyx/version.rb +1 -1
  68. metadata +59 -13
  69. data/docs/about.md +0 -18
  70. data/docs/calyx-docs.scss +0 -66
  71. data/docs/guide/examples.md +0 -59
  72. data/docs/guide/getting-started.md +0 -129
  73. data/docs/guide/installation.md +0 -19
@@ -0,0 +1,54 @@
1
+ .menu {
2
+ width: 100%;
3
+ padding-top: $scale-p0;
4
+
5
+ .menu-label,
6
+ .menu-list li {
7
+ @include at-least-tablet {
8
+ font-size: $scale-p0;
9
+ }
10
+
11
+ @include until-tablet {
12
+ font-size: $scale-p1;
13
+ }
14
+ }
15
+
16
+ .menu-label {
17
+ margin: $scale-p0 0 0 0;
18
+ font-weight: 700;
19
+ font-family: $font-display-family;
20
+
21
+ &:first-child {
22
+ margin-top: 0;
23
+ }
24
+
25
+ a {
26
+ display: block;
27
+ padding: $scale-m1 $scale-p0;
28
+ }
29
+ }
30
+
31
+ .menu-list {
32
+ a {
33
+ display: block;
34
+ padding: $scale-m1 $scale-p0;
35
+ }
36
+ }
37
+
38
+ .menu-label, .menu-list {
39
+ a {
40
+ color: $color-sidebar-link;
41
+
42
+ &.is-active {
43
+ color: $color-white;
44
+ background-color: $color-eucalyptus;
45
+ }
46
+
47
+ &:hover {
48
+ &:not(.is-active) {
49
+ background-color: $color-sidebar-link-background-hover;
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
@@ -0,0 +1,3 @@
1
+ .is-hidden {
2
+ display: none;
3
+ }
@@ -0,0 +1,161 @@
1
+ $navbar-height: ($scale-p0 + $scale-m3) * 3;
2
+ $navbar-transition-timing: 0.2s;
3
+ $color-navbar-hover: darken($color-meadow, 6%);
4
+
5
+ .navbar {
6
+ width: 100%;
7
+ height: $navbar-height;
8
+ background-color: $color-meadow;
9
+
10
+ @include until-tablet {
11
+ //transition: height $navbar-transition-timing ease-in;
12
+
13
+ .nav-menu {
14
+ visibility: hidden;
15
+ }
16
+
17
+ &.is-open {
18
+ height: 100vh;
19
+ //transition: height $navbar-transition-timing ease-in;
20
+ overflow-y: scroll;
21
+
22
+ .logo {
23
+ height: $navbar-height;
24
+ background-color: $color-navbar-hover;
25
+ }
26
+
27
+ .nav-menu {
28
+ visibility: visible;
29
+ }
30
+ }
31
+ }
32
+
33
+ @include at-least-tablet {
34
+ display: flex;
35
+ justify-content: space-between;
36
+ }
37
+
38
+ @include at-least-desktop {
39
+ justify-content: space-between;
40
+ }
41
+
42
+ .nav-toggle {
43
+ color: $color-white;
44
+ font-size: $scale-p2;
45
+ height: $navbar-height;
46
+ display: inline-block;
47
+ line-height: $scale-p2;
48
+
49
+ &:hover {
50
+ background-color: $color-navbar-hover;
51
+ }
52
+
53
+ @include at-least-tablet {
54
+ display: none;
55
+ }
56
+ }
57
+
58
+ &.is-fixed {
59
+ position: fixed;
60
+ top: 0px;
61
+ z-index: 2000;
62
+ }
63
+
64
+ .nav-brand {
65
+ @include at-least-tablet {
66
+ display: flex;
67
+ align-items: center;
68
+ }
69
+
70
+ @include until-tablet {
71
+ width: 100%;
72
+
73
+ .nav-menu ul {
74
+ justify-content: center;
75
+ }
76
+ }
77
+
78
+ .logo {
79
+ height: $navbar-height;
80
+ display: flex;
81
+ align-items: center;
82
+ }
83
+
84
+ .logo-mark {
85
+ width: 36px;
86
+ height: 36px;
87
+ padding: $scale-p0 $scale-m1 $scale-p0 $scale-p0;
88
+ }
89
+
90
+ .logo-type {
91
+ color: #fff;
92
+ font-family: $font-display-family;
93
+ font-weight: 800;
94
+ font-size: $scale-p1;
95
+ padding-right: $scale-p0;
96
+ }
97
+ }
98
+
99
+ .nav-menu {
100
+ @include at-least-desktop {
101
+ margin-left: $scale-p3;
102
+ }
103
+
104
+ &.is-meta {
105
+ margin-left: 0;
106
+ }
107
+
108
+ ul {
109
+ @include at-least-tablet {
110
+ display: flex;
111
+ align-items: center;
112
+ }
113
+
114
+ li {
115
+ font-size: $scale-p0;
116
+ line-height: 1.2;
117
+ height: $navbar-height;
118
+ font-family: $font-display-family;
119
+ font-weight: 700;
120
+ color: $color-white;
121
+
122
+ a {
123
+ display: block;
124
+ box-sizing: border-box;
125
+ padding: $scale-p0 + $scale-m3;
126
+ height: $navbar-height;
127
+ color: $color-white;
128
+
129
+ &:hover {
130
+ background-color: $color-navbar-hover;
131
+ }
132
+
133
+ svg {
134
+ display: inline;
135
+ }
136
+
137
+ span {
138
+ display: none;
139
+ }
140
+ }
141
+
142
+ @include until-tablet {
143
+ font-size: $scale-p2;
144
+ height: auto;
145
+
146
+ a {
147
+ height: auto;
148
+
149
+ svg {
150
+ display: none;
151
+ }
152
+
153
+ span {
154
+ display: inline;
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
160
+ }
161
+ }
@@ -0,0 +1,32 @@
1
+ $pagebar-height: ($scale-p2 + $scale-p1 + $scale-m2 + $scale-m3);
2
+
3
+ .pagebar {
4
+ background-color: $color-eucalyptus;
5
+ height: $pagebar-height;
6
+ color: $color-white;
7
+ padding: $scale-p0;
8
+
9
+ .breadcrumbs {
10
+ display: flex;
11
+ align-items: baseline;
12
+ justify-content: flex-start;
13
+
14
+ li {
15
+ margin-right: $scale-m2;
16
+ font-size: $scale-m1;
17
+
18
+ &:not(:first-child) {
19
+ &:before {
20
+ content: "/";
21
+ margin-right: $scale-m2;
22
+ }
23
+ }
24
+ }
25
+ }
26
+
27
+ h1 {
28
+ margin-top: $scale-m3;
29
+ line-height: 1.2;
30
+ font-size: $scale-p2;
31
+ }
32
+ }
@@ -0,0 +1,92 @@
1
+ // Via: https://github.com/maetl/highball
2
+
3
+ html {
4
+ // Setting text-size-adjust to 100% means that fonts don't automatically zoom on mobile browsers
5
+ // (but pinch zoom still works).
6
+ -ms-text-size-adjust: 100%;
7
+ -webkit-text-size-adjust: 100%;
8
+ }
9
+
10
+ body {
11
+ // Remove default margins from the document.
12
+ margin: 0;
13
+
14
+ // Make the base font size consistent across all browsers.
15
+ font-size: 1rem;
16
+
17
+ // TODO: what is the best option here?
18
+ -moz-osx-font-smoothing: grayscale;
19
+ -webkit-font-smoothing: antialiased;
20
+ }
21
+
22
+ h1,
23
+ h2,
24
+ h3,
25
+ h4,
26
+ h5,
27
+ h6
28
+ p,
29
+ blockquote,
30
+ figure,
31
+ ol,
32
+ ul {
33
+ // Remove margin and padding from content block elements. This makes it easier to style
34
+ // by adding margins and ratios, rather than resetting 0 all over the place.
35
+ margin: 0;
36
+ padding: 0;
37
+ }
38
+
39
+ main,
40
+ li {
41
+ // Strangely, main isn't block level in certain versions of IE. Also, list items not being
42
+ // block by default leads to fiddly resets when they're used in nav bars or menus.
43
+ display: block;
44
+ }
45
+
46
+ h1,
47
+ h2,
48
+ h3,
49
+ h4,
50
+ h5,
51
+ h6 {
52
+ // Make font sizes reset
53
+ font-size: inherit;
54
+ }
55
+
56
+ strong {
57
+ // Bold, not bolder.
58
+ font-weight: bold;
59
+ }
60
+
61
+ a,
62
+ button {
63
+ // fixes buttons not inheriting text color in most browsers
64
+ color: inherit;
65
+ }
66
+
67
+ a {
68
+ // This is what we want most of the time for apps. Content sites are a little different.
69
+ text-decoration: none;
70
+ }
71
+
72
+ button {
73
+ overflow: visible;
74
+ border: 0;
75
+ font: inherit;
76
+ -webkit-font-smoothing: inherit;
77
+ letter-spacing: inherit;
78
+ background: none;
79
+ cursor: pointer;
80
+ }
81
+
82
+ ::-moz-focus-inner {
83
+ // Fix a Firefox WTF.
84
+ padding: 0;
85
+ border: 0;
86
+ }
87
+
88
+ img {
89
+ max-width: 100%;
90
+ height: auto;
91
+ border: 0;
92
+ }
@@ -0,0 +1,23 @@
1
+ // https://github.com/modularscale/modularscale-sass#ratios
2
+
3
+ $unit-base: 1rem;
4
+
5
+ $ratio-major-twelfth: 1.3;
6
+ $ratio-fifth: 1.5;
7
+ $ratio-minor-sixth: 1.6;
8
+ $ratio-golden: 1.618;
9
+ $ratio-augmented-fourth: 1.414;
10
+
11
+ $ratio: $ratio-major-twelfth;
12
+
13
+ $scale-p0: $unit-base;
14
+ $scale-p1: $unit-base * $ratio;
15
+ $scale-p2: $unit-base * ($ratio * 2);
16
+ $scale-p3: $unit-base * ($ratio * 3);
17
+ $scale-p4: $unit-base * ($ratio * 4);
18
+
19
+ $scale-m0: $unit-base;
20
+ $scale-m1: $unit-base / $ratio;
21
+ $scale-m2: $unit-base / ($ratio * 2);
22
+ $scale-m3: $unit-base / ($ratio * 3);
23
+ $scale-m4: $unit-base / ($ratio * 4);
@@ -0,0 +1,55 @@
1
+ .spread {
2
+ //height: 100vh;
3
+ display: flex;
4
+ align-items: center;
5
+ padding: $scale-p3 $scale-p3 $scale-p2 $scale-p3;
6
+ //justify-content: center;
7
+
8
+ &.spread-hero {
9
+ background-color: $color-eucalyptus;
10
+ color: $color-white;
11
+ }
12
+
13
+ &.spread-intro {
14
+ p {
15
+ font-size: $scale-p0;
16
+ font-weight: 700;
17
+ color: $color-stromboli;
18
+ padding-bottom: $scale-p0;
19
+ border-bottom: $scale-m4 solid $color-stromboli;
20
+ }
21
+ }
22
+
23
+ .identity {
24
+ width: 30%;
25
+ display: flex;
26
+ align-items: center;
27
+ justify-content: center;
28
+
29
+ // img {
30
+ // animation-name: logospin;
31
+ // animation-duration: 5s;
32
+ // animation-iteration-count: infinite;
33
+ // transform-origin: 50% 50%;
34
+ // }
35
+ //
36
+ // @keyframes logospin {
37
+ // 0% {
38
+ // transform: rotate(0deg);
39
+ // }
40
+ // 100% {
41
+ // transform: rotate(360deg);
42
+ // }
43
+ // }
44
+ }
45
+
46
+ .lede {
47
+ width: 60%;
48
+
49
+ h2 {
50
+ margin-bottom: $scale-p1;
51
+ font-size: $scale-p2;
52
+ line-height: 1.2;
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,52 @@
1
+ .color-chip {
2
+ width: 100%;
3
+ height: 100px;
4
+ }
5
+
6
+ .color-aquamarine {
7
+ background-color: #76FABB;
8
+ }
9
+
10
+ .color-meadow {
11
+ background-color: #1BDE81;
12
+ }
13
+
14
+ .color-eucalyptus {
15
+ background-color: #218764;
16
+ }
17
+
18
+ .color-stromboli {
19
+ background-color: #2F5E52;
20
+ }
21
+
22
+ .p0 {
23
+ font-size: $scale-p0;
24
+ line-height: 1.125;
25
+ margin: 0;
26
+ }
27
+
28
+ .p1 {
29
+ font-size: $scale-p1;
30
+ line-height: 1.125;
31
+ margin: 0;
32
+ }
33
+
34
+ .p2 {
35
+ font-size: $scale-p2;
36
+ line-height: 1.125;
37
+ margin: 0;
38
+ }
39
+
40
+ .p3 {
41
+ font-size: $scale-p3;
42
+ line-height: 1.125;
43
+ margin: 0;
44
+ }
45
+
46
+ .p4 {
47
+ font-size: $scale-p4;
48
+ line-height: 1.125;
49
+ margin: 0;
50
+ white-space: nowrap;
51
+ overflow: hidden;
52
+ }