jekyll-theme-primer 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/_layouts/default.html +1 -1
  3. data/_sass/jekyll-theme-primer.scss +0 -1
  4. data/_sass/primer-base/CHANGELOG.md +20 -0
  5. data/_sass/primer-base/README.md +1 -1
  6. data/_sass/primer-base/build/build.css +1 -2
  7. data/_sass/primer-base/build/index.js +1 -0
  8. data/_sass/primer-base/index.scss +1 -1
  9. data/_sass/primer-base/lib/base.scss +1 -0
  10. data/_sass/{normalize.css → primer-base/lib}/normalize.scss +6 -2
  11. data/_sass/primer-base/lib/typography-base.scss +1 -1
  12. data/_sass/primer-base/package.json +36 -34
  13. data/_sass/primer-layout/CHANGELOG.md +19 -0
  14. data/_sass/primer-layout/README.md +3 -7
  15. data/_sass/primer-layout/build/build.css +1 -2
  16. data/_sass/primer-layout/build/index.js +1 -0
  17. data/_sass/primer-layout/index.scss +1 -0
  18. data/_sass/primer-layout/lib/grid.scss +0 -1
  19. data/_sass/primer-layout/package.json +35 -32
  20. data/_sass/primer-markdown/CHANGELOG.md +29 -0
  21. data/_sass/primer-markdown/README.md +1 -6
  22. data/_sass/primer-markdown/build/build.css +1 -2
  23. data/_sass/primer-markdown/build/index.js +1 -0
  24. data/_sass/primer-markdown/lib/blob-csv.scss +3 -3
  25. data/_sass/primer-markdown/lib/code.scss +2 -2
  26. data/_sass/primer-markdown/lib/headings.scss +4 -4
  27. data/_sass/primer-markdown/lib/images.scss +3 -3
  28. data/_sass/primer-markdown/lib/lists.scss +1 -1
  29. data/_sass/primer-markdown/lib/markdown-body.scss +9 -9
  30. data/_sass/primer-markdown/lib/tables.scss +9 -5
  31. data/_sass/primer-markdown/package.json +34 -31
  32. data/_sass/primer-support/CHANGELOG.md +85 -0
  33. data/_sass/primer-support/README.md +1 -1
  34. data/_sass/primer-support/index.scss +5 -1
  35. data/_sass/primer-support/lib/mixins/buttons.scss +156 -0
  36. data/_sass/primer-support/lib/mixins/misc.scss +1 -1
  37. data/_sass/primer-support/lib/mixins/typography.scss +4 -4
  38. data/_sass/primer-support/lib/variables/color-system.scss +114 -0
  39. data/_sass/primer-support/lib/variables/colors.scss +64 -0
  40. data/_sass/primer-support/lib/variables/layout.scss +58 -0
  41. data/_sass/primer-support/lib/variables/misc.scss +45 -0
  42. data/_sass/primer-support/lib/variables/typography.scss +35 -0
  43. data/_sass/primer-support/package.json +33 -29
  44. data/_sass/primer-utilities/CHANGELOG.md +130 -0
  45. data/_sass/primer-utilities/README.md +2 -2
  46. data/_sass/primer-utilities/build/build.css +1 -2
  47. data/_sass/primer-utilities/build/index.js +1 -2
  48. data/_sass/primer-utilities/index.scss +5 -1
  49. data/_sass/primer-utilities/lib/animations.scss +8 -11
  50. data/_sass/primer-utilities/lib/borders.scss +61 -0
  51. data/_sass/primer-utilities/lib/box-shadow.scss +26 -0
  52. data/_sass/primer-utilities/lib/colors.scss +72 -10
  53. data/_sass/primer-utilities/lib/flexbox.scss +80 -0
  54. data/_sass/primer-utilities/lib/layout.scss +37 -50
  55. data/_sass/primer-utilities/lib/margin.scss +37 -9
  56. data/_sass/primer-utilities/lib/padding.scss +16 -3
  57. data/_sass/primer-utilities/lib/typography.scss +65 -9
  58. data/_sass/primer-utilities/lib/visibility-display.scss +95 -0
  59. data/_sass/primer-utilities/package.json +35 -35
  60. metadata +17 -10
  61. data/_sass/normalize.css/CHANGELOG.md +0 -135
  62. data/_sass/normalize.css/LICENSE.md +0 -21
  63. data/_sass/normalize.css/README.md +0 -128
  64. data/_sass/normalize.css/package.json +0 -111
  65. data/_sass/primer-support/lib/variables.scss +0 -179
  66. data/_sass/primer-utilities/lib/border.scss +0 -29
@@ -1,7 +1,7 @@
1
1
  # Primer CSS Support
2
2
 
3
3
  [![NPM version](http://img.shields.io/npm/v/primer-support.svg)](https://www.npmjs.org/package/primer-support)
4
- [![Build Status](https://travis-ci.org/primer/support.svg?branch=master)](https://travis-ci.org/primer/support)
4
+ [![Build Status](https://travis-ci.org/primer/primer-support.svg?branch=master)](https://travis-ci.org/primer/primer-support)
5
5
 
6
6
  > Support files are Sass variables, mixins, and functions that we import into different bases for use across components, objects, and utilities. Sharing these common properties across GitHub sites helps us to keep our styles more consistent.
7
7
  >
@@ -1,7 +1,11 @@
1
1
  // variables
2
- @import "./lib/variables.scss";
2
+ @import "./lib/variables/typography.scss";
3
+ @import "./lib/variables/colors.scss";
4
+ @import "./lib/variables/layout.scss";
5
+ @import "./lib/variables/misc.scss";
3
6
 
4
7
  // mixins
5
8
  @import "./lib/mixins/typography.scss";
6
9
  @import "./lib/mixins/layout.scss";
10
+ @import "./lib/mixins/buttons.scss";
7
11
  @import "./lib/mixins/misc.scss";
@@ -0,0 +1,156 @@
1
+ // stylelint-disable block-closing-brace-newline-after
2
+
3
+ // Button color generator for primary and themed buttons
4
+
5
+ // New button hotness
6
+ @mixin btn-solid($color, $bg, $bg2) {
7
+ color: $color;
8
+ background-color: $bg2;
9
+ background-image: linear-gradient(-180deg, $bg 0%, $bg2 90%);
10
+
11
+ @if $bg == $gray-000 {
12
+ &:focus,
13
+ &.focus {
14
+ box-shadow: $btn-input-focus-shadow;
15
+ }
16
+
17
+ &:hover,
18
+ &.hover {
19
+ background-color: darken($bg2, 3%);
20
+ background-image: linear-gradient(-180deg, darken($bg, 3%) 0%, darken($bg2, 3%) 90%);
21
+ background-position: 0 -0.5em;
22
+ border-color: rgba($black, 0.35);
23
+ }
24
+
25
+ &:active,
26
+ &.selected {
27
+ background-color: darken(desaturate($bg, 10%), 6%);
28
+ background-image: none;
29
+ border-color: rgba($black, 0.35); // repeat to avoid shift on click-drag off of button
30
+ box-shadow: $btn-active-shadow;
31
+ }
32
+
33
+ &:disabled,
34
+ &.disabled {
35
+ color: rgba($color, 0.4);
36
+ background-color: $bg2;
37
+ background-image: none;
38
+ border-color: transparentize($black, 0.8); // back to default .btn
39
+ box-shadow: none;
40
+ }
41
+
42
+ } @else {
43
+ &:focus,
44
+ &.focus {
45
+ box-shadow: 0 0 0 0.2em rgba($bg, 0.3);
46
+ }
47
+
48
+ &:hover,
49
+ &.hover {
50
+ background-color: darken($bg2, 2%);
51
+ background-image: linear-gradient(-180deg, darken($bg, 2%) 0%, darken($bg2, 2%) 90%);
52
+ background-position: 0 -0.5em;
53
+ border-color: $black-fade-50;
54
+ }
55
+
56
+ &:active,
57
+ &.selected {
58
+ background-color: darken(mix($bg, $bg2, 50%), 7%);
59
+ background-image: none;
60
+ border-color: $black-fade-50; // repeat to avoid shift on click-drag off of button
61
+ box-shadow: $btn-active-shadow;
62
+ }
63
+
64
+ &:disabled,
65
+ &.disabled {
66
+ color: rgba($color, 0.75);
67
+ background-color: mix($bg2, $white, 50%);
68
+ background-image: none;
69
+ border-color: transparentize($black, 0.8); // repeat .btn default to avoid shift on click-drag off of button
70
+ box-shadow: none;
71
+ }
72
+
73
+ .counter {
74
+ color: darken($bg, 8%);
75
+ background-color: $white;
76
+ }
77
+ }
78
+ }
79
+
80
+ // Inverse button hover style
81
+ @mixin btn-inverse($color, $bg, $bg2) {
82
+ color: $color;
83
+ background-color: $bg;
84
+ background-image: linear-gradient(-180deg, $bg 0%, $bg2 90%);
85
+
86
+ &:focus {
87
+ box-shadow: 0 0 0 0.2em rgba($color, 0.3);
88
+ }
89
+
90
+ &:hover {
91
+ color: $text-white;
92
+ background-color: $color;
93
+ background-image: linear-gradient(-180deg, lighten($color, 10%) 0%, $color 90%);
94
+ border-color: $black-fade-50;
95
+
96
+ .counter {
97
+ color: $text-white;
98
+ }
99
+ }
100
+
101
+ &:active,
102
+ &.selected {
103
+ color: $text-white;
104
+ background-color: darken($color, 5%);
105
+ background-image: none;
106
+ border-color: $black-fade-50;
107
+ box-shadow: $btn-active-shadow;
108
+ }
109
+
110
+ &:disabled,
111
+ &.disabled {
112
+ color: rgba($color, 0.4);
113
+ background-color: $bg2;
114
+ background-image: none;
115
+ border-color: transparentize($black, 0.8); // back to default .btn
116
+ box-shadow: none;
117
+ }
118
+ }
119
+
120
+ // Outline color generator for btn-outline to make the hover state inverse the text and bg colors.
121
+ @mixin btn-outline($text-color: $text-blue, $bg-color: $bg-white) {
122
+ color: $text-color;
123
+ background-color: $bg-color;
124
+ background-image: none;
125
+
126
+ .counter {
127
+ background-color: rgba(0, 0, 0, 0.07);
128
+ }
129
+
130
+ &:hover,
131
+ &:active,
132
+ &.selected {
133
+ color: $bg-color;
134
+ background-color: $text-color;
135
+ background-image: none;
136
+ border-color: $text-color;
137
+
138
+ .counter {
139
+ color: $text-color;
140
+ background-color: $bg-color;
141
+ }
142
+ }
143
+
144
+ &:focus {
145
+ border-color: $text-color;
146
+ box-shadow: 0 0 0 0.2em rgba($text-color, 0.3);
147
+ }
148
+
149
+ &:disabled,
150
+ &.disabled {
151
+ color: $black-fade-30;
152
+ background-color: $bg-white;
153
+ border-color: rgba(0, 0, 0, 0.15);
154
+ box-shadow: none;
155
+ }
156
+ }
@@ -1,5 +1,5 @@
1
1
  // Generate a two-color caret for any element.
2
- @mixin double-caret($foreground: #fff, $background: #ddd) {
2
+ @mixin double-caret($foreground: $text-white, $background: lighten($gray-300, 5%)) {
3
3
  &::after,
4
4
  &::before {
5
5
  position: absolute;
@@ -44,7 +44,7 @@
44
44
  // and don't need to be smaller on mobile.
45
45
  @mixin h1-reponsive {
46
46
  font-size: 26px;
47
- font-weight: bold;
47
+ font-weight: $font-weight-bold;
48
48
 
49
49
  // Up to 32px in future
50
50
  @include breakpoint(md) { font-size: 30px; }
@@ -53,7 +53,7 @@
53
53
 
54
54
  @mixin h2-responsive {
55
55
  font-size: 20px;
56
- font-weight: bold;
56
+ font-weight: $font-weight-bold;
57
57
 
58
58
  // Up to 22px or 24px in future
59
59
  @include breakpoint(md) { font-size: 21px; }
@@ -61,7 +61,7 @@
61
61
 
62
62
  @mixin h3-responsive {
63
63
  font-size: 14px;
64
- font-weight: bold;
64
+ font-weight: $font-weight-bold;
65
65
 
66
66
  @include breakpoint(md) { font-size: 16px; }
67
67
 
@@ -69,7 +69,7 @@
69
69
 
70
70
  @mixin h4-responsive {
71
71
  font-size: 13px;
72
- font-weight: bold;
72
+ font-weight: $font-weight-bold;
73
73
 
74
74
  @include breakpoint(md) { font-size: 14px; }
75
75
 
@@ -0,0 +1,114 @@
1
+ //
2
+ //
3
+ // -------- Grays --------
4
+ $gray-000: #fafbfc !default;
5
+ $gray-100: #f6f8fa !default;
6
+ $gray-200: #e1e4e8 !default;
7
+ $gray-300: #d1d5da !default;
8
+ $gray-400: #959da5 !default;
9
+ $gray-500: #6a737d !default;
10
+ $gray-600: #586069 !default;
11
+ $gray-700: #444d56 !default;
12
+ $gray-800: #2f363d !default;
13
+ $gray-900: #24292e !default; // body font color
14
+
15
+ // -------- Blue --------
16
+ $blue-000: #f1f8ff !default;
17
+ $blue-100: #dbedff !default;
18
+ $blue-200: #c8e1ff !default;
19
+ $blue-300: #79b8ff !default;
20
+ $blue-400: #2188ff !default;
21
+ $blue-500: #0366d6 !default; // Default: Passes AA with #fff
22
+ $blue-600: #005cc5 !default;
23
+ $blue-700: #044289 !default;
24
+ $blue-800: #032f62 !default;
25
+ $blue-900: #05264c !default; // Passes with 1/2/300 blues
26
+
27
+ // -------- Green --------
28
+ $green-000: #f0fff4 !default;
29
+ $green-100: #dcffe4 !default;
30
+ $green-200: #bef5cb !default;
31
+ $green-300: #85e89d !default;
32
+ $green-400: #34d058 !default;
33
+ $green-500: #28a745 !default; // Default. passes AA Large
34
+ $green-600: #22863a !default; // Text green, passes AA on #fff
35
+ $green-700: #176f2c !default;
36
+ $green-800: #165c26 !default;
37
+ $green-900: #144620 !default;
38
+
39
+ // -------- Yellow --------
40
+ $yellow-000: #fffdef !default;
41
+ $yellow-100: #fffbdd !default;
42
+ $yellow-200: #fff5b1 !default;
43
+ $yellow-300: #ffea7f !default;
44
+ $yellow-400: #ffdf5d !default;
45
+ $yellow-500: #ffd33d !default;
46
+ $yellow-600: #f9c513 !default;
47
+ $yellow-700: #dbab09 !default;
48
+ $yellow-800: #b08800 !default;
49
+ $yellow-900: #735c0f !default;
50
+
51
+ // -------- Orange --------
52
+ $orange-000: #fff8f2 !default;
53
+ $orange-100: #ffebda !default;
54
+ $orange-200: #ffd1ac !default;
55
+ $orange-300: #ffab70 !default;
56
+ $orange-400: #fb8532 !default;
57
+ $orange-500: #f66a0a !default; // Default. passes AA Large with #fff
58
+ $orange-600: #e36209 !default;
59
+ $orange-700: #d15704 !default;
60
+ $orange-800: #c24e00 !default;
61
+ $orange-900: #a04100 !default;
62
+
63
+ // -------- Red --------
64
+ $red-000: #ffeef0 !default;
65
+ $red-100: #ffdce0 !default;
66
+ $red-200: #fdaeb7 !default;
67
+ $red-300: #f97583 !default;
68
+ $red-400: #ea4a5a !default;
69
+ $red-500: #d73a49 !default; // Default. passes AA
70
+ $red-600: #cb2431 !default;
71
+ $red-700: #b31d28 !default;
72
+ $red-800: #9e1c23 !default;
73
+ $red-900: #86181d !default;
74
+
75
+ // -------- Purple --------
76
+ $purple-000: #f5f0ff !default;
77
+ $purple-100: #e6dcfd !default;
78
+ $purple-200: #d1bcf9 !default;
79
+ $purple-300: #b392f0 !default;
80
+ $purple-400: #8a63d2 !default;
81
+ $purple-500: #6f42c1 !default; // passes AA with #fff
82
+ $purple-600: #5a32a3 !default;
83
+ $purple-700: #4c2889 !default;
84
+ $purple-800: #3a1d6e !default;
85
+ $purple-900: #29134e !default;
86
+
87
+ // -------- Fades --------
88
+ // Black based on same hue as $gray-900
89
+ $black: #1b1f23 !default;
90
+ $white: #fff !default;
91
+
92
+ $black-fade-15: transparentize($black, 0.85) !default;
93
+ $black-fade-30: transparentize($black, 0.7) !default;
94
+ $black-fade-50: transparentize($black, 0.5) !default;
95
+ $black-fade-70: transparentize($black, 0.3) !default;
96
+ $black-fade-85: transparentize($black, 0.15) !default;
97
+
98
+ $white-fade-15: transparentize($white, 0.85) !default;
99
+ $white-fade-30: transparentize($white, 0.7) !default;
100
+ $white-fade-50: transparentize($white, 0.5) !default;
101
+ $white-fade-70: transparentize($white, 0.3) !default;
102
+ $white-fade-85: transparentize($white, 0.15) !default;
103
+
104
+ // -------- Color System --------
105
+ $red: $red-500 !default;
106
+ $purple: $purple-500 !default;
107
+ $blue: $blue-500 !default;
108
+ $green: $green-500 !default;
109
+ $yellow: $yellow-500 !default;
110
+ $orange: $orange-500 !default;
111
+
112
+ $gray-dark: $gray-900 !default;
113
+ $gray-light: $gray-400 !default;
114
+ $gray: $gray-500 !default;
@@ -0,0 +1,64 @@
1
+ @import "color-system.scss";
2
+ // Color variables
3
+ // stylelint-disable declaration-bang-space-before
4
+
5
+ // State indicators.
6
+ $status-renamed: $yellow-500 !default;
7
+ $status-pending: desaturate($yellow-700, 15%) !default;
8
+
9
+ // Repository type colors
10
+ // Should be able to deprecate these in future
11
+ $repo-private-text: $black-fade-70 !default;
12
+ $repo-private-bg: $yellow-000 !default;
13
+ $repo-private-icon: transparentize($yellow-900, 0.5) !default;
14
+
15
+ // Highlight used for things like search
16
+ $highlight-yellow: rgba(255, 247, 140, 0.5);
17
+
18
+ // Border colors
19
+ $border-black-fade: $black-fade-15 !default;
20
+
21
+ $border-blue: $blue-500 !default;
22
+ $border-blue-light: $blue-200 !default;
23
+
24
+ $border-green: $green-400 !default;
25
+ $border-green-light: desaturate($green-300, 40%) !default;
26
+
27
+ $border-red: $red !default;
28
+ $border-red-light: desaturate($red-300, 60%) !default;
29
+
30
+ $border-yellow: desaturate($yellow-300, 60%) !default;
31
+
32
+ $border-gray-dark: $gray-300 !default;
33
+ $border-gray-darker: $gray-700 !default;
34
+ $border-gray-light: lighten($gray-200, 3%) !default;
35
+ $border-gray: $gray-200 !default;
36
+
37
+ // Background colors
38
+ $bg-blue-light: $blue-000 !default;
39
+ $bg-blue: $blue-500 !default;
40
+ $bg-gray-dark: $gray-900 !default;
41
+ $bg-gray-light: $gray-000 !default;
42
+ $bg-gray: $gray-100 !default;
43
+ $bg-green: $green-500 !default;
44
+ $bg-green-light: $green-100 !default;
45
+ $bg-orange: $orange-700 !default;
46
+ $bg-purple: $purple-500 !default;
47
+ $bg-purple-light: $purple-000 !default;
48
+ $bg-red: $red-500 !default;
49
+ $bg-red-light: $red-100 !default;
50
+ $bg-white: $white !default;
51
+ $bg-yellow: $yellow-500 !default;
52
+ $bg-yellow-light: $yellow-200 !default;
53
+
54
+ // Text colors
55
+ $text-blue: $blue-500 !default;
56
+ $text-gray-dark: $gray-900 !default;
57
+ $text-gray-light: $gray-500 !default;
58
+ $text-gray: $gray-600 !default;
59
+ $text-green: $green-500 !default;
60
+ $text-orange: $orange-900 !default;
61
+ $text-orange-light: $orange-600 !default;
62
+ $text-purple: $purple !default;
63
+ $text-red: $red-600 !default;
64
+ $text-white: $white !default;
@@ -0,0 +1,58 @@
1
+ // Layout variables
2
+ // stylelint-disable declaration-bang-space-before
3
+
4
+ // These are our margin and padding utility spacers. The default step size we
5
+ // use is 8px. This gives us a key of:
6
+ // 0 => 0px
7
+ // 1 => 4px
8
+ // 2 => 8px
9
+ // 3 => 12px
10
+ // 4 => 24px
11
+ // 5 => 32px
12
+ // 6 => 40px
13
+ $spacer: 8px !default;
14
+ $spacers: (
15
+ 0,
16
+ round($spacer / 2),
17
+ $spacer,
18
+ $spacer * 2,
19
+ $spacer * 3,
20
+ $spacer * 4,
21
+ $spacer * 5
22
+ ) !default;
23
+
24
+ // Aliases for easy use
25
+ $spacer-1: nth($spacers, 2) !default; // 4px
26
+ $spacer-2: nth($spacers, 3) !default; // 8px
27
+ $spacer-3: nth($spacers, 4) !default; // 12px
28
+ $spacer-4: nth($spacers, 5) !default; // 24px
29
+ $spacer-5: nth($spacers, 6) !default; // 32px
30
+ $spacer-6: nth($spacers, 7) !default; // 40px
31
+
32
+ // Fixed-width container variables
33
+ $container-width: 980px !default;
34
+ $grid-gutter: 10px !default;
35
+
36
+ // Breakpoint widths
37
+ $width-xs: 0;
38
+ $width-sm: 544px;
39
+ $width-md: 768px;
40
+ $width-lg: 1012px;
41
+ $width-xl: 1280px;
42
+
43
+ // Responsive container widths
44
+ $container-md: $width-md !default;
45
+ $container-lg: $width-lg !default;
46
+ $container-xl: $width-xl !default;
47
+
48
+ // Breakpoints
49
+ $breakpoints: (
50
+ // Small screen / phone
51
+ sm: $width-sm,
52
+ // Medium screen / tablet
53
+ md: $width-md,
54
+ // Large screen / desktop (980 + (12 * 2)) <= container + gutters
55
+ lg: $width-lg,
56
+ // Extra large screen / wide desktop
57
+ xl: $width-xl
58
+ ) !default;