Skip to content

Commit

Permalink
if no selector on anchor, don't style in EuiText (#1373)
Browse files Browse the repository at this point in the history
* if no selector on anchor, don't style in EuiText

* cl / comments
  • Loading branch information
snide authored Dec 14, 2018
1 parent 5d610f5 commit 8c54c17
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## [`master`](https://github.com/elastic/eui/tree/master)

No public interface changes since `5.8.0`.
**Bug fixes**

- Only style anchor tags in `EuiText` that have no class attribute ([#1373](https://github.com/elastic/eui/pull/1373))

## [`5.8.0`](https://github.com/elastic/eui/tree/v5.8.0)

Expand Down
2 changes: 2 additions & 0 deletions src-docs/src/views/call_out/warning.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React from 'react';
import {
EuiCallOut,
EuiLink,
EuiButton,
} from '../../../../src/components';

export default () => (
Expand All @@ -14,5 +15,6 @@ export default () => (
<p>
Here be dragons. Don&rsquo;t wanna mess with no dragons. And <EuiLink href="#">here&rsquo;s a link</EuiLink>.
</p>
<EuiButton href="#" color="warning">Link button</EuiButton>
</EuiCallOut>
);
4 changes: 3 additions & 1 deletion src/components/text/_text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@
// coloring will likely coming from the reset.scss anyway.
color: inherit;

a {
// Style anchors that don't have a class. This prevents overwriting "buttons"
// and other stylized elements passed in.
a:not([class]) {
color: $euiLinkColor;

&:hover {
Expand Down

0 comments on commit 8c54c17

Please sign in to comment.