Skip to content

Commit 062feb3

Browse files
authored
Merge pull request #252 from ember-learn/redesign/links
Link styling
2 parents ed93287 + cbd44dc commit 062feb3

File tree

4 files changed

+50
-17
lines changed

4 files changed

+50
-17
lines changed

addon/styles/colors.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@
4141
& a {
4242
color: var(--color-white);
4343
}
44+
45+
& a {
46+
background-image: linear-gradient(
47+
var(--color-white-40),
48+
var(--color-white-40)
49+
);
50+
}
4451
}
4552

4653
.bg-info {

addon/styles/components/es-footer.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
& a {
77
text-decoration: none;
88
color: var(--color-gray-900);
9+
background-image: none;
910
}
1011

1112
& .footer-info {

addon/styles/components/es-header.css

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
padding: 0 var(--grid-margin);
77
}
88

9+
.es-header a:link,
10+
.es-header a:visited {
11+
background-image: none;
12+
}
13+
914
.es-header ul,
1015
.es-header li {
1116
list-style: none;
@@ -51,7 +56,7 @@
5156
border-radius: var(--radius-lg);
5257
box-sizing: border-box;
5358
line-height: var(--line-height-base);
54-
color: #fff;
59+
color: var(--color-white);
5560
}
5661

5762
[aria-expanded="true"] ~ .navbar-list,
@@ -93,6 +98,10 @@
9398
width: unset;
9499
}
95100

101+
.navbar-list-item-link:hover {
102+
color: var(--color-brand-hc-light);
103+
}
104+
96105
.navbar-list-item-dropdown-toggle {
97106
border: 0;
98107
display: block;
@@ -110,14 +119,14 @@
110119
}
111120

112121
.navbar-list-item-dropdown-toggle[aria-expanded="true"] {
113-
color: #ff5c44;
122+
color: var(--color-brand-hc-light);
114123
background-image: url("data:image/svg+xml,%3Csvg width='8' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M.295 4.293C-.335 4.923.11 6 1.002 6h5.996c.891 0 1.337-1.077.707-1.707l-2.998-3a1 1 0 0 0-1.414 0l-2.998 3z' fill='%23E04E39' fill-rule='nonzero'/%3E%3C/svg%3E");
115124
}
116125

117126
.navbar-dropdown-list {
118127
margin: 0;
119128
padding: 0;
120-
background: #f4f6f8;
129+
background: var(--color-gray-100);
121130
border-radius: var(--radius);
122131
}
123132

@@ -135,26 +144,27 @@
135144
margin: 0;
136145
height: 0;
137146
list-style: none;
138-
border-bottom: 2px solid #dee2e7;
147+
border-bottom: 2px solid var(--color-gray-300);
139148
}
140149

141150
.navbar-dropdown-list-item {
142151
display: block;
143152
white-space: nowrap;
144153
}
145154

146-
.navbar-dropdown-list-item-link {
155+
.navbar-dropdown-list-item-link,
156+
.navbar-dropdown-list-item-link:link,
157+
.navbar-dropdown-list-item-link:visited {
147158
color: var(--color-brand);
148159
display: block;
149-
/* padding: 1rem 2rem; */
150160
text-decoration: none;
151161
}
152162

153163
.navbar-dropdown-list-item-link:hover,
154164
.navbar-dropdown-list-item-link:focus {
155165
position: relative;
156-
background: #dee2e7;
157-
color: #cf2d20;
166+
background: var(--color-gray-300);
167+
color: var(--color-brand);
158168
z-index: 1;
159169
}
160170

@@ -213,6 +223,7 @@
213223
0 3px 30px -15px rgba(73, 79, 95, 0.8),
214224
0 0 50px -5px rgba(73, 79, 95, 0.5);
215225
width: auto;
226+
min-width: 12rem;
216227
margin: 0;
217228
position: absolute;
218229
left: -0.5rem;

addon/styles/global.css

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
:root {
22
/* Vertical rhythm is based on multiples of 8. */
33

4-
--font-family-sans: 'Inter var', 'Inter web', -apple-system, BlinkMacSystemFont, Segoe UI,
5-
Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
4+
--font-family-sans: "Inter var", "Inter web", -apple-system,
5+
BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif,
6+
Apple Color Emoji, Segoe UI Emoji;
67

78
--color-white: #fff;
89
--color-gray-100: #f4f6f8;
@@ -15,11 +16,13 @@
1516
--color-gray-800: #2b2d34;
1617
--color-gray-900: #1c1e24;
1718
--color-black: #000;
19+
--color-white-40: rgba(255, 255, 255, 0.4);
1820

1921
--color-brand: #e04e39;
2022
--color-brand-text: #ffd7d2;
2123
--color-brand-hc-light: #ff5c44;
2224
--color-brand-hc-dark: #cf2d20;
25+
--color-brand-40: rgba(224, 78, 57, 0.4);
2326

2427
--color-gray: #a2a3a8;
2528
--color-success: #d9f9e3;
@@ -97,11 +100,6 @@
97100
}
98101
}
99102

100-
*:focus {
101-
outline: none;
102-
box-shadow: 0 0 0px 3px rgba(25, 116, 220, 0.8);
103-
}
104-
105103
body,
106104
html {
107105
margin: 0;
@@ -121,13 +119,29 @@ main {
121119
background-color: var(--color-gray-100);
122120
}
123121

124-
a {
122+
a,
123+
a:link,
124+
a:visited {
125+
color: var(--color-brand-hc-dark);
126+
text-decoration: none;
127+
background: no-repeat left bottom
128+
linear-gradient(var(--color-brand-40), var(--color-brand-40));
129+
background-size: 100% 0.1875rem;
130+
}
131+
132+
a:focus,
133+
a:hover {
125134
color: var(--color-brand);
126135
}
127136

128137
a:active,
129138
.active {
130-
color: var(--color-gray-900);
139+
color: var(--color-brand);
140+
}
141+
142+
*:focus {
143+
outline: none;
144+
box-shadow: 0 0 0px 3px rgba(25, 116, 220, 0.8);
131145
}
132146

133147
p {

0 commit comments

Comments
 (0)