Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some quick CSS fixes #864

Merged
merged 6 commits into from
May 23, 2018
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
**Bug fixes**

- `EuiButton`, `EuiButtonEmpty`, and `EuiButtonIcon` now look and behave disabled when `isDisabled={true}` ([#862](https://github.com/elastic/eui/pull/862))
- Added FF/IE fallback for `.eui-textBreakWord` ([#864](https://github.com/elastic/eui/pull/864))
- Fixed `EuiCard` description text color when used in/as an anchor tag ([#864](https://github.com/elastic/eui/pull/864))
- Fixed `EuiCard` IE bugs ([#864](https://github.com/elastic/eui/pull/864))

## [`0.0.49`](https://github.com/elastic/eui/tree/v0.0.49)

Expand Down
7 changes: 7 additions & 0 deletions src/components/card/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ $euiCardTitleSize: 18px; // Hardcoded pixel value for theme parity.
/**
* 1. Footer is always at the bottom.
* 2. Extend beta badges to at least 40% of the card's width
* 3. Fix for IE to ensure badges are visible outside of a <button> tag
* 4. Fix for IE where the image correctly resizes in width but doesn't collapse it's height
(https://github.com/philipwalton/flexbugs/issues/75#issuecomment-134702421)
*/

// EuiCard specific
.euiCard {
display: flex;
flex-direction: column;
padding: $euiCardSpacing;
overflow: visible; /* 3 */

&.euiCard--hasBetaBadge {
position: relative;
Expand Down Expand Up @@ -82,6 +86,7 @@ $euiCardTitleSize: 18px; // Hardcoded pixel value for theme parity.
.euiCard__top {
flex-grow: 0; /* 1 */
position: relative;
min-height: 1px; /* 4 */

.euiCard__icon {
margin-top: $euiCardSpacing/2;
Expand All @@ -103,6 +108,7 @@ $euiCardTitleSize: 18px; // Hardcoded pixel value for theme parity.
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -75%); // Fallback for IE as it doesn't accept calcs in translates
transform: translate(-50%, calc(-50% + #{$euiCardSpacing * -1}));
}
}
Expand All @@ -123,6 +129,7 @@ $euiCardTitleSize: 18px; // Hardcoded pixel value for theme parity.
}

.euiCard__description {
color: $euiTextColor; // Ensures regular text color if wrapped in an anchor tag
margin-top: $euiCardSpacing/2;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@

.euiFormControlLayout__iconButton {
pointer-events: all;
top: $euiFormControlPadding - 1px;
@include size($euiSize);

.euiIcon {
vertical-align: baseline;
}

@at-root {
.euiFormControlLayout--compressed#{&} {
Expand Down
8 changes: 6 additions & 2 deletions src/global_styling/utility/_utility.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@
.eui-textCenter {text-align: center !important;}
.eui-textLeft {text-align: left !important;}
.eui-textRight {text-align: right !important;}
.eui-textBreakWord {word-break: break-word !important;}
.eui-textBreakAll {word-break: break-all !important;}
.eui-textNoWrap {white-space: nowrap !important;}
.eui-textInheritColor {color: inherit !important;}

.eui-textBreakAll {word-break: break-all !important;}
.eui-textBreakWord {
word-break: break-all !important; // Fallback for FF and IE
word-break: break-word !important;
}

/**
* Text truncation
*
Expand Down