From 8c54c1789472644ba8c008140191220bbbbf3b38 Mon Sep 17 00:00:00 2001 From: "dave.snider@gmail.com" Date: Thu, 13 Dec 2018 20:55:25 -0800 Subject: [PATCH] if no selector on anchor, don't style in EuiText (#1373) * if no selector on anchor, don't style in EuiText * cl / comments --- CHANGELOG.md | 4 +++- src-docs/src/views/call_out/warning.js | 2 ++ src/components/text/_text.scss | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e40ecfd87dd..628f000bd20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/src-docs/src/views/call_out/warning.js b/src-docs/src/views/call_out/warning.js index 50257c938a7..943f0e7f577 100644 --- a/src-docs/src/views/call_out/warning.js +++ b/src-docs/src/views/call_out/warning.js @@ -3,6 +3,7 @@ import React from 'react'; import { EuiCallOut, EuiLink, + EuiButton, } from '../../../../src/components'; export default () => ( @@ -14,5 +15,6 @@ export default () => (

Here be dragons. Don’t wanna mess with no dragons. And here’s a link.

+ Link button ); diff --git a/src/components/text/_text.scss b/src/components/text/_text.scss index 100480e37aa..9435459f0df 100644 --- a/src/components/text/_text.scss +++ b/src/components/text/_text.scss @@ -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 {