Skip to content

Commit f3e63d5

Browse files
willlarcheebidel
authored andcommitted
[Styling] Visual refresh. (#50)
* [Styling] Visual refresh. * [Styling] Color changes and trying to center the lines. * [Styling] Changing the green on a button. * [Styling] Correcting import. * [Styling] Removing test copy. * [Styling] Weight correction. * [Styling] Properly importing Google Sans. * [Styling] Better use of variables for colors. * [Styling] Correcting one old color. * [Styling] Formatting
1 parent a152221 commit f3e63d5

8 files changed

+134
-69
lines changed

codelab-style.html

Lines changed: 62 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
-->
1616

1717
<link rel="import" href="../paper-styles/color.html">
18+
<link rel="import" href="google-sans.html">
1819

1920
<dom-module id="codelab-style">
2021
<template strip-whitespace>
@@ -31,10 +32,22 @@
3132
};
3233

3334
--app-drawer-content-container: {
34-
background: var(--google-codelab-background, --paper-grey-100);
35+
background: var(--google-codelab-background, #FFFFFF);
3536
};
3637

3738
--nav-height: 64px;
39+
40+
--google-material-blue-600: #1A73E8;
41+
--google-material-blue-800: #185ABC;
42+
43+
--google-material-green-600: #1E8E3E;
44+
45+
--google-material-grey-900: #212124;
46+
--google-material-grey-800: #3C4043;
47+
--google-material-grey-700: #5f6368;
48+
--google-material-grey-600: #80868B;
49+
--google-material-grey-300: #DADCE0;
50+
--google-material-grey-100: #F1F3F4;
3851
}
3952

4053

@@ -60,10 +73,11 @@
6073

6174
.drawer-content-wrapper {
6275
padding: 16px;
76+
border-right: 1px solid var(--google-material-grey-300);
6377
}
6478

6579
#main-content {
66-
background: var(--google-codelab-background, --paper-grey-300);
80+
background: var(--google-codelab-background, --paper-blue-300);
6781
}
6882

6983
#pages {
@@ -75,8 +89,9 @@
7589
}
7690

7791
#main-toolbar {
78-
background: var(--google-codelab-header-background, --paper-blue-600);
79-
color: #fff;
92+
background: var(--google-codelab-header-background, #FFFFFF);
93+
box-shadow: 0px 1px 2px 0px rgba(60, 64, 67, 0.3), 0px 2px 6px 2px rgba(60, 64, 67, 0.15);
94+
color: var(--google-material-grey-800);
8095
display: flex;
8196
align-items: center;
8297
justify-content: space-between;
@@ -87,7 +102,8 @@
87102
#main-toolbar .title {
88103
margin: 0 8px;
89104
flex: 1;
90-
font-weight: 300;
105+
font-weight: 400;
106+
font-family: 'Google Sans', Arial, sans-serif;
91107
white-space: nowrap;
92108
overflow: hidden;
93109
text-overflow: ellipsis;
@@ -142,63 +158,82 @@
142158

143159
#controls .fabs {
144160
/* Note: custom props don't work in calc(). */
145-
max-width: calc(800px + 175px);
161+
max-width: calc(800px + 250px);
146162
margin: 0 auto;
147163
}
148164

149165
.navbutton {
166+
border-radius: 4px;
167+
font-family: 'Google Sans', Arial, sans-serif;
168+
font-size: 14px;
169+
font-weight: 600;
170+
letter-spacing: .6px;
171+
padding-bottom: 6px;
172+
padding-left: 24px;
173+
padding-right: 24px;
174+
padding-top: 6px;
150175
pointer-events: initial; /* make sure buttons are clickable */
176+
text-transform: none;
177+
}
178+
179+
.navbutton.nextbutton {
180+
background: var(--google-material-blue-600);
181+
color: #FFFFFF;
151182
}
152183

153184
.navbutton.prevbutton {
185+
background: #FFFFFF;
186+
color: var(--google-material-blue-600);
154187
transition: transform 300ms ease-in-out;
155188
}
156189

157190
.navbutton.prevbutton[disabled] {
158-
background: var(--google-codelab-fab-background);
159191
color: white;
160192
transform: scale(0);
161193
}
162194

163195
.navbutton.donebutton {
164-
background: var(--google-green-500);
196+
background: var(--google-material-green-600);
197+
color: #FFFFFF;
165198
}
166-
199+
167200
#toc {
168201
/* ensures bottom of nav scrolling meny doesn't overlap with file bug link. */
169202
margin-bottom: 1.5em;
170203
}
171204

172205
.toc-item {
173206
font-size: 14px;
174-
color: var(--paper-grey-500);
207+
color: var(--google-material-grey-600);
175208
overflow: hidden;
176209
border-radius: 4px;
177210
padding: 6px 16px;
178211
box-sizing: content-box; /* override users that set * selector box-sizing. */
212+
line-height: 20px;
213+
font-weight: 400;
179214
}
180215

181216
.toc-item i {
217+
color: #FFFFFF;
182218
display: inline-block;
183219
font-style: normal;
184-
width: 24px;
185-
min-width: 24px;
186-
background: #fff;
220+
width: 26px;
221+
min-width: 26px;
222+
background: var(--google-material-grey-600);
187223
border-radius: 50%;
188224
text-align: center;
189-
height: 24px;
225+
height: 26px;
190226
vertical-align: middle;
191-
line-height: 24px;
192-
border: 2px solid var(--paper-grey-400);
227+
line-height: 26px;
193228
margin-right: 8px;
194-
font-weight: 400;
195229
}
196230

197231
.toc-item i::before,
198232
.toc-item i::after {
199233
content: '';
200234
display: block;
201-
border-left: 1px solid var(--paper-grey-400);
235+
border-left: 1px solid var(--google-material-grey-600);
236+
border-right: 1px solid var(--google-material-grey-600);
202237
width: 0;
203238
height: 44px;
204239
z-index: 1;
@@ -215,12 +250,17 @@
215250
}
216251

217252
.toc-item.completed {
218-
color: var(--paper-grey-900);
253+
color: var(--google-material-grey-900);
254+
}
255+
256+
.toc-item.completed i,
257+
.toc-item.iron-selected i {
258+
background-color: var(--google-material-blue-600);
219259
}
220260

221261
.toc-item.iron-selected {
222-
color: var(--paper-grey-900);
223-
background-color: var(--paper-grey-300);
262+
color: var(--google-material-grey-900);
263+
background-color: var(--google-material-grey-300);
224264
font-weight: 600;
225265
}
226266

@@ -229,7 +269,7 @@
229269
.toc-item.completed i::after,
230270
.toc-item.iron-selected i,
231271
.toc-item.iron-selected i:before {
232-
border-color: var(--paper-blue-500);
272+
border-color: var(--google-material-blue-600);
233273
}
234274

235275
.toc-item:first-of-type i::before,

demo/codelab.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<style is="custom-style">
3737
body {
3838
font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial;
39-
background: var(--google-codelab-background, --paper-grey-300);
39+
background: var(--google-codelab-background, #F8F9FA);
4040
}
4141
</style>
4242
</head>
@@ -97,7 +97,7 @@ <h2>Next up</h2>
9797
<google-codelab-step label="Using <google-map>" duration="5">
9898

9999
<p>The <a href="https://elements.polymer-project.org/browse?package=google-web-components">Google Web Components</a>&#160;provide the <code>&lt;google-map&gt;</code>&#160;element for declaratively rendering a Google Map. To use it, you first need to install it using Bower.</p>
100-
<aside class="special"><p><strong>What is Bower?</strong></p>
100+
<aside class="note"><p><strong>What is Bower?</strong></p>
101101
<p><a href="http://bower.io/">Bower</a>&#160;is a client-side package management tool that can be used with any web app. When working with Polymer, it simplifies the hassles of dependency management. Every component defines its own set of dependencies. When you use Bower to install a component, the component's dependencies are installed alongside it under <code>bower_components/</code>.</p></aside>
102102

103103
<h2>Install the <google-map> element</h2>

google-codelab-survey.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ <h4>How would rate your experience with Polymer?</h4>
5353
display: block;
5454
margin: 2em 0;
5555
padding: 0;
56-
background: var(--google-codelab-survey-background, #edf4ff);
57-
border-left: var(--google-codelab-survey-border, 4px solid #94BAF9);
56+
background: var(--google-codelab-survey-background, #E8F0FE);
57+
border-left: var(--google-codelab-survey-border, 4px solid #185ABC);
58+
border-radius: 4px;
59+
color: #3C4043;
5860
}
5961

6062
.survey > ::content h4 {

google-codelab.html

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,24 +139,21 @@ <h3 class="title">[[title]]</h3>
139139

140140
<footer id="controls" hidden$="[[noArrows]]" narrow$="[[_narrow]]">
141141
<div class="fabs layout horizontal justified">
142-
<paper-fab raised class="navbutton prevbutton" icon="chevron-left"
142+
<paper-button raised class="navbutton prevbutton"
143143
on-tap="selectPrevious"
144144
title="Previous step"
145-
disabled$="{{_isFirstStep(selected)}}">
146-
</paper-fab>
145+
disabled$="{{_isFirstStep(selected)}}">Back</paper-button>
147146

148147
<div>
149148
<template is="dom-if" if="{{_showNextFab(selected, steps)}}" strip-whitespace>
150-
<paper-fab icon="chevron-right" raised class="navbutton nextbutton"
149+
<paper-button raised class="navbutton nextbutton"
151150
title="{{_nextFabTitle(selected)}}"
152-
on-tap="selectNext">
153-
</paper-fab>
151+
on-tap="selectNext">Next</paper-button>
154152
</template>
155153

156154
<template is="dom-if" if="{{_showDoneFab(selected, steps)}}" strip-whitespace>
157-
<paper-fab icon="done" raised class="navbutton donebutton"
158-
on-tap="_goToHome" title="Complete codelab">
159-
</paper-fab>
155+
<paper-button raised class="navbutton donebutton"
156+
on-tap="_goToHome" title="Complete codelab">Done</paper-button>
160157
</template>
161158
</div>
162159
</div>

google-sans.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<link href="https://fonts.googleapis.com/css?family=Google+Sans" rel="stylesheet">

shared-style.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
<style>
2020
/* Theming - Custom CSS properties */
2121
:root {
22-
--paper-radio-button-checked-ink-color: #4285f4;
23-
--paper-radio-button-checked-color: #4285f4;
24-
--paper-radio-button-unchecked-color: #4285f4;
22+
--paper-radio-button-checked-ink-color: #185ABC;
23+
--paper-radio-button-checked-color: #185ABC;
24+
--paper-radio-button-unchecked-color: #185ABC;
2525
}
2626
</style>
2727
</template>

0 commit comments

Comments
 (0)