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 Apr 30, 2018
1 parent 869fcd9 commit 9358b8d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
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 9358b8d

Please sign in to comment.