Skip to content

Commit

Permalink
Move constrained max-width into a variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed May 1, 2018
1 parent 1ed4be0 commit 4a30b31
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src-docs/src/views/empty_prompt/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {

export default () => (
<EuiEmptyPrompt
iconType="editorStrike"
iconType="dataVisualizer"
iconColor={null}
iconSize="xs"
title={<h2>You have no spice</h2>}
Expand Down
4 changes: 2 additions & 2 deletions src/components/empty_prompt/_empty_prompt.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import '../text/_mixins';
@import '../text/_variables';

.euiEmptyPrompt {
@include euiTextConstrainedWidth;
max-width: $euiTextConstrainedMaxWidth;
text-align: center;
padding: $euiSizeL;
margin: auto;
Expand Down
2 changes: 1 addition & 1 deletion src/components/text/_index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'mixins';
@import 'variables';
@import 'text';
@import 'text_color';
@import 'text_align';
6 changes: 0 additions & 6 deletions src/components/text/_mixins.scss

This file was deleted.

5 changes: 4 additions & 1 deletion src/components/text/_text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,10 @@
@include euiScaleText($euiFontSize);

&.euiText--constrainedWidth {
@include euiTextConstrainedWidth;
max-width: $euiTextConstrainedMaxWidth;
// If the max-width is way too short of the width of the container,
// at least make it 2/3 of it's parent
min-width: 75%;
}

&.euiText--small {
Expand Down
1 change: 1 addition & 0 deletions src/components/text/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$euiTextConstrainedMaxWidth: 36em;

0 comments on commit 4a30b31

Please sign in to comment.