Skip to content
This repository was archived by the owner on Dec 11, 2021. It is now read-only.

Commit e147a19

Browse files
committed
Typography: Add Link Variables
1 parent 515abf2 commit e147a19

File tree

2 files changed

+46
-9
lines changed

2 files changed

+46
-9
lines changed

scss/atoms/typography/_typography.scss

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ h6 {
5454
font-size: em( 16px );
5555
font-weight: 600;
5656
line-height: 1;
57-
text-transform: uppercase;
57+
text-transform: uppercase; // FIXME Is this opinionated?
5858
}
5959

6060
/*
@@ -65,7 +65,7 @@ h6 {
6565

6666
hr {
6767
border: 0;
68-
border-bottom: 1px solid #999;
68+
border-bottom: 1px solid #999; //TODO replace with color variable
6969
}
7070

7171
blockquote {
@@ -78,7 +78,7 @@ blockquote {
7878

7979
pre {
8080
padding: 16px 20px;
81-
background: #f7f7f7;
81+
background: #f7f7f7; // TODO replace with color variable
8282
font: normal 12px/1.4 $monospace;
8383
}
8484

@@ -103,15 +103,23 @@ dd {
103103
*/
104104

105105
a {
106-
//TODO add colors
106+
color: map-get($link,color);
107+
font-weight: map-get($link,weight);
108+
text-decoration: map-get($link,decoration);
109+
110+
&:hover {
111+
color: map-get($link-hover,color);
112+
text-decoration: map-get($link-hover,decoration);
113+
}
107114

108-
&:hover,
109115
&:active,
110116
&:focus {
111-
//TODO add colors
117+
color: map-get($link-focus,color);
118+
text-decoration: map-get($link-focus,decoration);
112119
}
113120
&:visited {
114-
// TODO add colors
121+
color: map-get($link-visited,color);
122+
text-decoration: map-get($link-visited,decoration);
115123
}
116124
}
117125

@@ -124,5 +132,5 @@ code {
124132
background: #f2f2f2; // TODO replace with color variable
125133
font-size: em( 16px );
126134
padding: em( 4px, 16px ) em( 8px, 16px );
127-
border-radius: 3px;
135+
border-radius: 3px; // TODO replace with variable
128136
}

scss/variables/typography.js

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010

1111
var color = "#222",
1212
fontSize = "20px",
13-
lineHeight = 1.5;
13+
lineHeight = 1.5,
14+
linkColor = "#4078c0";
1415

1516
chassis.typography = {
1617
normal: {
@@ -52,6 +53,34 @@ chassis.typography = {
5253
sans: {
5354
name: "Font Family - Sans",
5455
value: "Helvetica, Arial, sans-serif"
56+
},
57+
link: {
58+
name: "Link",
59+
value: {
60+
color: linkColor, // TODO replace with a color from the color-palette
61+
decoration: "none"
62+
}
63+
},
64+
"link-hover": {
65+
name: "Link On Mouse Hover",
66+
value: {
67+
color: linkColor,
68+
decoration: "underline"
69+
}
70+
},
71+
"link-focus": {
72+
name: "Link On Focus or Active",
73+
value: {
74+
color: linkColor,
75+
decoration: "none"
76+
}
77+
},
78+
"link-visited": {
79+
name: "Link If Visited",
80+
value: {
81+
color: linkColor,
82+
decoration: "none"
83+
}
5584
}
5685
};
5786

0 commit comments

Comments
 (0)