Add support for dark theme links. (#11344) (#11348)

This commit is contained in:
CJ Cenizal 2017-04-20 10:57:46 -07:00 committed by GitHub
parent e0ea463b71
commit e322259f08
5 changed files with 57 additions and 37 deletions

View file

@ -4,6 +4,33 @@
}
}
/**
* 1. Enforce pointer when there's no href.
*/
@mixin link {
color: $globalLinkColor;
text-decoration: none;
cursor: pointer; /* 1 */
&:visited,
&:active {
color: $globalLinkColor;
}
&:hover {
color: $globalLinkHoverColor;
text-decoration: underline;
}
@include darkTheme {
color: $globalLinkColor--darkTheme;
&:hover {
color: $globalLinkColor--darkTheme;
}
}
}
/**
* 1. Links can't have a disabled attribute, so they can't support :disabled.
*/

View file

@ -1,18 +1,3 @@
/**
* 1. Enforce pointer when there's no href.
*/
.kuiLink {
color: $globalLinkColor;
text-decoration: none;
cursor: pointer; /* 1 */
&:visited,
&:active {
color: $globalLinkColor;
}
&:hover {
color: $globalLinkHoverColor;
text-decoration: underline;
}
@include link;
}

View file

@ -26,23 +26,13 @@
}
}
/**
* 1. Make it a bit darker to contrast with the gray background.
*/
.kuiLocalBreadcrumb__link {
@include link;
color: $localBreadcrumbLinkColor; /* 1 */
font-size: $globalFontSize;
color: $localBreadcrumbLinkColor;
text-decoration: none;
&:hover {
color: $localBreadcrumbLinkColor;
text-decoration: underline;
}
@include darkTheme {
color: $globalLinkColor--darkTheme;
&:hover {
color: $globalLinkColor--darkTheme;
}
}
}
.kuiLocalBreadcrumb__emphasis {

View file

@ -1,3 +1,6 @@
/**
* 1. Enforce pointer when there's no href.
*/
/**
* 1. Links can't have a disabled attribute, so they can't support :disabled.
*/
@ -1142,9 +1145,6 @@ body {
font-size: 14px;
line-height: 1.5; }
/**
* 1. Enforce pointer when there's no href.
*/
.kuiLink {
color: #3CAED2;
text-decoration: none;
@ -1155,6 +1155,10 @@ body {
.kuiLink:hover {
color: #006E8A;
text-decoration: underline; }
.theme-dark .kuiLink {
color: #b7e2ea; }
.theme-dark .kuiLink:hover {
color: #b7e2ea; }
.kuiLoadingItems {
padding: 30px;
@ -1192,12 +1196,21 @@ body {
.theme-dark .kuiLocalBreadcrumb + .kuiLocalBreadcrumb:before {
color: #a5a5a5; }
/**
* 1. Make it a bit darker to contrast with the gray background.
*/
.kuiLocalBreadcrumb__link {
font-size: 14px;
color: #3CAED2;
text-decoration: none;
cursor: pointer;
/* 1 */
color: #328caa;
text-decoration: none; }
/* 1 */
font-size: 14px; }
.kuiLocalBreadcrumb__link:visited, .kuiLocalBreadcrumb__link:active {
color: #3CAED2; }
.kuiLocalBreadcrumb__link:hover {
color: #328caa;
color: #006E8A;
text-decoration: underline; }
.theme-dark .kuiLocalBreadcrumb__link {
color: #b7e2ea; }

View file

@ -21,6 +21,11 @@ export default props => (
<GuideDemo
html={linkHtml}
/>
<GuideDemo
html={linkHtml}
isDarkTheme={true}
/>
</GuideSection>
</GuidePage>
);