Skip to content

Commit 9570f4e

Browse files
Merge pull request #36 from treehouse/website-redesign
Website redesign
2 parents 591e5f4 + 0461083 commit 9570f4e

26 files changed

+1418
-272
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Leap is an internal CSS library made for Treehouse. It contains immutable utilit
44
## Quick Start
55
Several options are available for installing Leap into your project.
66

7-
* [Download the latest release](https://github.com/treehouse/project-leap/archive/v0.10.0.zip)
7+
* [Download the latest release](https://github.com/treehouse/project-leap/archive/v0.11.0.zip)
88

99
* Clone the repo: `git clone https://github.com/treehouse/project-leap.git`
1010
* Install with [Bower](http://bower.io)
@@ -24,4 +24,4 @@ To get Jekyll running follow these steps:
2424
Way to go, nerd. You should be up and running now!
2525

2626
## Copyright and license
27-
Code and documentation copyright 2018 Treehouse Island, Inc. Code released under the [MIT license](https://github.com/treehouse/project-leap/LICENSE).
27+
Code and documentation copyright 2020 Treehouse Island, Inc. Code released under the [MIT license](https://github.com/treehouse/project-leap/LICENSE).

_includes/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</div>
88

99
<footer class="guide-contentinfo" role="contentinfo">
10-
<p class="guide-contentinfo-copy">Copyright &copy; 2018 Treehouse. All rights reserved.</p>
10+
<p class="guide-contentinfo-copy">Copyright &copy; 2020 Treehouse. All rights reserved.</p>
1111
</footer>
1212

1313
<script src="js/prism.js"></script>

_sass/leap/_variables.scss

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
$leap-version: "0.9.2";
1+
$leap-version: "0.11.0";
22

33
// Brand Colors
44
$brand-colors: (
55
"green": #5fcf80,
6+
"green-dark": #2F9D4F,
67
"gray": #3e474f,
78
"blue-light": #387bab, // AA 4.58
89
"blue-medium": #2a5d81,
@@ -42,6 +43,21 @@ $ui-colors: (
4243
"success": #24793d
4344
);
4445

46+
// Pop Colors
47+
$pop-colors: (
48+
"blue-pastel": #5185c1,
49+
"blue": #3859a2,
50+
"blue-dark": #323952,
51+
"teal": #0498b1,
52+
"green": #6ac17e,
53+
"golden": #ecc148,
54+
"orange": #e98134,
55+
"red-orange": #e95e31,
56+
"purple-pastel": #8171a0,
57+
"purple": #4a4290,
58+
"magenta": #b15592
59+
);
60+
4561
// Category colors
4662
$category-colors: (
4763
"back-end": (
@@ -91,6 +107,8 @@ $category-colors: (
91107
)
92108
);
93109

110+
111+
94112
// Spacing Units
95113
// 0 = 0px
96114
// 0.5 = 8px
@@ -124,14 +142,22 @@ $spacing-sides: (
124142

125143
// Type Variables
126144
$text-size: (
127-
0: 3rem,
128-
1: 2.25rem,
129-
2: 1.75rem,
130-
3: 1.25rem,
145+
0: 3.75rem,
146+
1: 3rem,
147+
2: 2.25rem,
148+
3: 1.5rem,
131149
4: 1.125rem,
132150
5: 1rem,
133151
6: 0.875rem
134152
);
153+
154+
$text-tracking: (
155+
0: 1.4px,
156+
1: 1.3px,
157+
2: 1.2px,
158+
3: 1px
159+
);
160+
135161
$gotham: "Gotham Rounded A", "Gotham Rounded B", "Helvetica", Helvetica, Arial, sans-serif;
136162
$bold: 500;
137163

_sass/leap/atoms/_button.sass

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,29 @@
3333
fill: brand-color(green)
3434

3535

36-
3736
// Primary buttons
3837
&--primary
39-
background-color: brand-color(green) !important
40-
border-color: brand-color(green) !important
38+
background: #50b06c !important
39+
background: linear-gradient(to bottom, #55ba73 0%,#50b06c 100%) !important
40+
border-color: transparent !important
41+
color: #fff !important
42+
svg
43+
fill: #fff !important
44+
+selected
45+
background: linear-gradient(#408d56,#408d56) !important
46+
border-color: transparent !important
47+
color: #fff !important
48+
49+
&--primary-teal
50+
background: #008298 !important
51+
background: linear-gradient(to bottom, #008298 0%,#007589 100%) !important
52+
border-color: transparent !important
4153
color: #fff !important
4254
svg
4355
fill: #fff !important
4456
+selected
45-
background-color: darken(brand-color(green), 15%) !important
46-
border-color: darken(brand-color(green), 15%) !important
57+
background: linear-gradient(#004652,#004652) !important
58+
border-color: transparent !important
4759
color: #fff !important
4860

4961
&--primary-blue
@@ -60,7 +72,7 @@
6072

6173
// Secondary buttons
6274
&--secondary
63-
background-color: transparent !important
75+
background-color: #fff !important
6476
border-color: $border-color-normal !important
6577
color: text-color(base) !important
6678
svg
@@ -107,7 +119,7 @@
107119
opacity: 0.88 !important
108120
svg
109121
fill: #fff !important
110-
+selected
122+
+selected-inverse
111123
border-color: #fff !important
112124
color: #fff !important
113125
opacity: 1 !important
@@ -119,14 +131,25 @@
119131
opacity: 0.88
120132
svg
121133
fill: text-color(medium) !important
122-
+selected
134+
+selected-inverse
135+
opacity: 1 !important
136+
137+
&-primary-teal
138+
background-color: #fff !important
139+
border-color: #fff !important
140+
color: text-color(medium) !important
141+
opacity: 0.88
142+
svg
143+
fill: pop-color(teal) !important
144+
+selected-inverse
145+
color: darken(pop-color(teal), 6%) !important
123146
opacity: 1 !important
124147

125148
&-disabled
126149
border-color: #fff !important
127150
color: #fff !important
128151
opacity: 0.15 !important
129-
+selected
152+
+selected-inverse
130153
border-color: #fff !important
131154
color: #fff !important
132155
opacity: 0.15 !important
@@ -136,14 +159,13 @@
136159
border-color: #fff !important
137160
color: text-color(medium) !important
138161
opacity: 0.15 !important
139-
+selected
162+
+selected-inverse
140163
background-color: #fff !important
141164
border-color: #fff !important
142165
color: text-color(medium) !important
143166
opacity: 0.15 !important
144167

145168

146-
147169
// Inline buttons next to input fields
148170
&--inline
149171
margin-top: 28px !important
@@ -215,11 +237,11 @@
215237
svg
216238
fill: darken(category-color(#{$category}, base), 10%) !important
217239
&.button--primary
218-
background-color: category-color(#{$category}, base) !important
240+
background: category-color(#{$category}, base) !important
219241
border-color: category-color(#{$category}, base) !important
220242
color: #fff !important
221243
+selected
222-
background-color: darken(category-color(#{$category}, base), 10%) !important
244+
background: darken(category-color(#{$category}, base), 10%) !important
223245
border-color: darken(category-color(#{$category}, base), 10%) !important
224246
svg
225247
fill: #fff !important

_sass/leap/atoms/_color.sass

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,26 @@ $properties: fill stroke color border-color background-color
123123
@else
124124
.category-#{$property}-#{$color-name}-#{$color-value}
125125
#{$property}: map-get($color, $color-value) !important
126+
127+
// Iterate through pop-colors map to create colors for classes
128+
@each $color-name, $color in $pop-colors
129+
130+
// Iterate through properties var to create properties for classes
131+
@each $property in $properties
132+
133+
// We want to use 'bg' for the class name when using the
134+
// background-color property
135+
//
136+
// We want to use 'border' for the class name when using the
137+
// border-color property
138+
//
139+
// Else just use the regular property name
140+
@if $property == background-color
141+
.pop-bg-#{$color-name}
142+
#{$property}: pop-color($color-name) !important
143+
@else if $property == border-color
144+
.pop-border-#{$color-name}
145+
#{$property}: pop-color($color-name) !important
146+
@else
147+
.pop-#{$property}-#{$color-name}
148+
#{$property}: pop-color($color-name) !important

_sass/leap/atoms/_flexbox.sass

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
// Adds flex and flex-inline classes
1+
// Adds flex and inline-flex classes
22
@mixin flex-container($suffix)
33
.flex
44
&-block-#{$suffix}
55
display: flex !important
66
&-inline-#{$suffix}
7-
display: flex-inline !important
7+
display: inline-flex !important
88

99
// Adds flex direction classes
1010
@mixin flex-direction($suffix)
@@ -107,8 +107,12 @@
107107
align-self: auto !important
108108
&-start-#{$suffix}
109109
align-self: flex-start !important
110+
&-start-flush-#{$suffix}
111+
align-self: start !important
110112
&-end-#{$suffix}
111113
align-self: flex-end !important
114+
&-end-flush-#{$suffix}
115+
align-self: end !important
112116
&-center-#{$suffix}
113117
align-self: center !important
114118
&-stretch-#{$suffix}

_sass/leap/atoms/_forms.sass

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,11 @@ $form-states: success, warning, error
9999
&:focus
100100
background-color: $form-background-active
101101
border-color: $form-border-active
102+
box-shadow: 0 0 0px 2px $form-border-active
102103
// Focus & Hover States for Form Feedback
103104
+form-feedback-bg-active
104105
+form-feedback-active(border-color)
106+
box-shadow: 0 0 0px 2px $form-border-active
105107
// Default Hover State
106108
&:hover
107109
border-color: $form-border-active
@@ -141,6 +143,7 @@ $form-states: success, warning, error
141143
&:focus
142144
background-color: $form-background-active
143145
border: 2px solid $form-border-active
146+
box-shadow: 0 0 0px 2px $form-border-active
144147
+form-feedback-bg-active
145148
+form-feedback-active(border-color)
146149
&:hover
@@ -189,8 +192,9 @@ $form-states: success, warning, error
189192
color: $form-color-active
190193
&:before
191194
border: 2px solid $form-border-active
195+
box-shadow: 0 0 0px 2px $form-border-active
192196
// Hover states for radio and checkboxes
193-
&:hover+.form-label
197+
&:hover+.form-label, &:focus+.form-label
194198
cursor: pointer
195199
&:before
196200
border: 2px solid $form-border-active
@@ -199,6 +203,7 @@ $form-states: success, warning, error
199203
&:hover+.text-color-white, &:focus+.text-color-white
200204
&:before
201205
border: 2px solid #fff
206+
box-shadow: 0 0 0px 2px $form-border-active
202207
// Default Radio Styles
203208
&-radio
204209
&+.form-label:before
@@ -253,6 +258,7 @@ $form-states: success, warning, error
253258
&:focus + .form-label
254259
background-color: $form-background-active
255260
border: 2px solid $form-border-active
261+
box-shadow: 0 0 0px 2px $form-border-active
256262
color: $form-color-active
257263
// Form feedback
258264
+form-feedback-active(border-color, color)
@@ -302,6 +308,9 @@ $form-states: success, warning, error
302308
float: left
303309
&:focus
304310
border: 2px solid #fff
311+
box-shadow: 0 0 0px 4px rgba(0,0,0,.75)
312+
outline: 2px dotted transparent
313+
outline-offset: 2px
305314

306315
// Variable width feedback message with top arrow
307316
.form-radio ~ .form-feedback,
@@ -431,12 +440,15 @@ $form-states: success, warning, error
431440
+form-feedback-bg-active
432441
+form-feedback-active(border-color)
433442
// Default Hover and Focus States
434-
&:hover, &:focus
443+
&:hover
435444
-webkit-box-shadow: 0px 0px 0px 3px rgba(45,51,57,0.6)
436445
-moz-box-shadow: 0px 0px 0px 3px rgba(45,51,57,0.6)
437446
box-shadow: 0px 0px 0px 3px rgba(45,51,57,0.6)
438447
&:focus
439448
border: 2px solid #fff
449+
box-shadow: 0 0 0px 4px rgba(0,0,0,.75)
450+
outline: 2px dotted transparent
451+
outline-offset: 2px
440452
// Focus & Hover States for Form Feedback
441453
+form-feedback-bg-active
442454
// Getting rid of extra spacing that appears below textarea; size varies among browsers.
@@ -470,9 +482,9 @@ $form-states: success, warning, error
470482
&:focus
471483
background-color: $form-background-active
472484
border: 2px solid #fff
473-
-webkit-box-shadow: 0px 0px 0px 3px rgba(45,51,57,0.6)
474-
-moz-box-shadow: 0px 0px 0px 3px rgba(45,51,57,0.6)
475-
box-shadow: 0px 0px 0px 3px rgba(45,51,57,0.6)
485+
box-shadow: 0 0 0px 4px rgba(0,0,0,.75)
486+
outline: 2px dotted transparent
487+
outline-offset: 2px
476488
&:hover
477489
background-color: $form-background-active
478490
color: $form-color-active
@@ -517,13 +529,20 @@ $form-states: success, warning, error
517529
color: #fff
518530
// Adding in focus states for accessibility
519531
// Hover states for radio and checkboxes
520-
&:hover+.form-label, &:focus+.form-label
532+
&:hover+.form-label
521533
&:before
522534
border: 2px solid #fff
523535
cursor: pointer
524536
-webkit-box-shadow: 0px 0px 0px 3px rgba(45,51,57,0.6)
525537
-moz-box-shadow: 0px 0px 0px 3px rgba(45,51,57,0.6)
526538
box-shadow: 0px 0px 0px 3px rgba(45,51,57,0.6)
539+
&:focus+.form-label
540+
&:before
541+
border: 2px solid #fff
542+
cursor: pointer
543+
box-shadow: 0 0 0px 4px rgba(0,0,0,.75)
544+
outline: 2px dotted transparent
545+
outline-offset: 2px
527546
// Default Radio Styles
528547
&-radio
529548
&+.form-label:before
@@ -576,10 +595,13 @@ $form-states: success, warning, error
576595
+form-feedback-bg-active
577596
+form-feedback(border-color, color)
578597
// Adding in focus & hover states
579-
&:focus + .form-label,
580598
& + .form-label:hover
581599
-webkit-box-shadow: 0px 0px 0px 3px rgba(45,51,57,0.6)
582600
-moz-box-shadow: 0px 0px 0px 3px rgba(45,51,57,0.6)
583601
box-shadow: 0px 0px 0px 3px rgba(45,51,57,0.6)
602+
&:focus + .form-label
603+
box-shadow: 0 0 0px 4px rgba(0,0,0,.75)
604+
outline: 2px dotted transparent
605+
outline-offset: 2px
584606
color: $form-color-active
585607
// Focused & Hover states for form feedback

0 commit comments

Comments
 (0)