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

Move shared component mixins to global_styles #2551

Merged
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b830e70
Move euiPanel mixin to global_styling for easier overriding
johnbarrierwilson Nov 20, 2019
557923c
Move button mixin to global_styling
johnbarrierwilson Nov 22, 2019
54fce1a
Move loading mixin to global_styling
johnbarrierwilson Nov 25, 2019
f2bae9e
Move popover mixin to global_styling
johnbarrierwilson Nov 25, 2019
d0a59b7
Move form, switch, and range mixins and variables to global_styling
johnbarrierwilson Nov 25, 2019
b122095
Add changelog entry
johnbarrierwilson Nov 26, 2019
fbcef8b
Merge branch 'master' into eui-amsterdam/architecture
johnbarrierwilson Nov 26, 2019
9678361
Merge from elastic/eui:master
johnbarrierwilson Dec 3, 2019
6de15c5
Move changelog item to "breaking changes" heading
johnbarrierwilson Dec 3, 2019
7d33eb0
Move buttons variables to global_styling
johnbarrierwilson Dec 3, 2019
f019ba1
Move buttons variables to global_styling
johnbarrierwilson Dec 3, 2019
a48e501
Merge branch 'eui-amsterdam/architecture' of github.com:johnbarrierwi…
johnbarrierwilson Dec 3, 2019
bd77848
Consolidate form variables files
johnbarrierwilson Dec 3, 2019
d86676d
Remove form variable imports in form mixin file
johnbarrierwilson Dec 3, 2019
6fe5da0
Move beta_badge mixins to global_styling
johnbarrierwilson Dec 3, 2019
3eaf91a
Move tooltip variables and mixins to global_styling
johnbarrierwilson Dec 3, 2019
7c29ff6
Refactor panel mixin to require entire selector
johnbarrierwilson Dec 3, 2019
84e0c7e
Add note to changelog about panel mixin selector
johnbarrierwilson Dec 3, 2019
6c75e79
Remove $euiPanelBorderColor as it was not used
johnbarrierwilson Dec 3, 2019
4c79b40
Renaming mixin `fasBetaBadge` to `euiHasBetaBadge`
Dec 3, 2019
757f843
Combined `form_control_layout` mixins into `form` file
Dec 3, 2019
4eafed5
Adding `!default`s to global variables
Dec 4, 2019
5be1b7c
Move panel variables to global
Dec 4, 2019
de0e216
Cleanup
Dec 4, 2019
b0eb3a1
Update tense in the CL
johnbarrierwilson Dec 5, 2019
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Added `disabled` prop to the `EuiCheckboxGroup` definition ([#2545](https://github.com/elastic/eui/pull/2545))
- Added `disabled` option to the `option` attribute of the `options` object that is passed to the `EuiCheckboxGroup` so that checkboxes in a group can be individually disabled ([#2548](https://github.com/elastic/eui/pull/2548))
- Added `EuiAspectRatio` component that allows for responsively resizing embeds ([#2535](https://github.com/elastic/eui/pull/2535))
- Moved any shared component-level Sass variables and mixins into the `global_styling` directory ([#2551](https://github.com/elastic/eui/pull/2551))
johnbarrierwilson marked this conversation as resolved.
Show resolved Hide resolved

**Bug fixes**

Expand Down
3 changes: 0 additions & 3 deletions src/components/button/_button.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../loading/mixins';

// This file has lots of modifiers and is somewhat nesty by nature
//sass-lint:disable nesting-depth

Expand Down Expand Up @@ -79,7 +77,6 @@
// Create button modifiers based upon the map.
@each $name, $color in $euiButtonTypes {
.euiButton--#{$name} {

@if ($name == 'ghost') {
// Ghost is unique and ALWAYS sits against a dark background.
color: $color;
Expand Down
1 change: 0 additions & 1 deletion src/components/button/_index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import 'variables';
johnbarrierwilson marked this conversation as resolved.
Show resolved Hide resolved
@import 'mixins';

@import 'button';
@import 'button_empty/index';
Expand Down
2 changes: 0 additions & 2 deletions src/components/button/button_group/_button_group.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../../form/variables';

.euiButtonGroup {
max-width: 100%;
display: flex;
Expand Down
2 changes: 0 additions & 2 deletions src/components/card/_card.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import '../panel/mixins';
@import '../badge/beta_badge/mixins';
johnbarrierwilson marked this conversation as resolved.
Show resolved Hide resolved

// Start with a base of EuiPanel styles
Expand Down Expand Up @@ -197,4 +196,3 @@
.euiCard--hasChildren .euiCard__description {
margin-bottom: $euiCardSpacing;
}

2 changes: 0 additions & 2 deletions src/components/color_picker/_color_picker.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../form/mixins';

.euiColorPicker {
position: relative;
width: $euiColorPickerWidth;
Expand Down
4 changes: 0 additions & 4 deletions src/components/color_picker/_hue.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
@import '../form/_mixins';
@import '../form/range/_variables';
@import '../form/range/_mixins';

// This wraps the range. It is needed because there is no way to do a linear gradeint in ie11 for the track
.euiHue {
// sass-lint:disable-block no-color-literals
Expand Down
2 changes: 0 additions & 2 deletions src/components/color_picker/color_stops/_color_stops.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../../form/range/_variables';

.euiColorStops:not(.euiColorStops-isDisabled) {
&:focus {
outline: 2px solid $euiFocusRingColor;
Expand Down
2 changes: 0 additions & 2 deletions src/components/combo_box/_combo_box.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../form/form_control_layout/mixins';

.euiComboBox {
@include euiFormControlSize(auto, $includeAlternates: true);
position: relative;
Expand Down
4 changes: 0 additions & 4 deletions src/components/combo_box/_index.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
@import '../form/variables';
@import '../form/mixins';
@import '../form/form_control_layout/mixins';

@import 'combo_box';
@import 'combo_box_input/index';
@import 'combo_box_options_list/index';
2 changes: 0 additions & 2 deletions src/components/context_menu/_context_menu_panel.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../popover/mixins';

.euiContextMenuPanel {
width: 100%;
visibility: visible;
Expand Down
4 changes: 0 additions & 4 deletions src/components/date_picker/_date_picker_range.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
@import '../form/variables';
@import '../form/mixins';
@import '../form/form_control_layout/variables';

/**
* 1. Account for inner box-shadow style border
*/
Expand Down
2 changes: 0 additions & 2 deletions src/components/date_picker/super_date_picker/_mixins.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../../form/form_control_layout/variables';

@mixin euiSuperDatePickerText {
@include euiFormControlText;
display: block;
Expand Down
2 changes: 0 additions & 2 deletions src/components/drag_and_drop/_droppable.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../panel/mixins';

.euiDroppable {
$euiDroppableColor: $euiColorSecondary;
transition: background-color $euiAnimSpeedExtraSlow ease;
Expand Down
1 change: 0 additions & 1 deletion src/components/facet/_index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import '../button/variables';
johnbarrierwilson marked this conversation as resolved.
Show resolved Hide resolved
@import '../button/mixins';

@import 'facet_button';
@import 'facet_group';
2 changes: 0 additions & 2 deletions src/components/filter_group/_filter_button.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../form/variables';

.euiFilterButton {
background-color: $euiFormBackgroundColor;
height: $euiFormControlHeight;
Expand Down
2 changes: 0 additions & 2 deletions src/components/filter_group/_filter_group.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../form/variables';

.euiFilterGroup {
display: inline-flex;
max-width: 100%;
Expand Down
3 changes: 0 additions & 3 deletions src/components/filter_group/_index.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
@import '../form/variables';
@import '../form/mixins';

@import 'filter_group';
@import 'filter_button';
@import 'filter_select_item';
2 changes: 0 additions & 2 deletions src/components/flyout/_flyout.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../form/variables';

.euiFlyout {
border-left: $euiBorderThin;
// The mixin augments the above
Expand Down
3 changes: 0 additions & 3 deletions src/components/form/_index.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
@import 'variables';
@import 'mixins';

@import 'checkbox/index';
@import 'described_form_group/index';
@import 'field_number/index';
Expand Down
1 change: 0 additions & 1 deletion src/components/form/checkbox/_index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
@import '../variables';
@import 'checkbox';
@import 'checkbox_group';
2 changes: 0 additions & 2 deletions src/components/form/file_picker/_file_picker.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../form_control_layout/mixins';

/**
* REMEMBER: --large modifiers must come last to override --compressed
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
@import '../variables';
@import '../mixins';

.euiFormControlLayout {
// Let the height expand as needed
@include euiFormControlSize($includeAlternates: true);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
@import '../variables';
@import '../mixins';

.euiFormControlLayoutDelimited {
// Match just the regular drop shadow of inputs
@include euiFormControlDefaultShadow;
Expand Down
2 changes: 0 additions & 2 deletions src/components/form/form_control_layout/_index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import 'variables';
@import 'mixins';
@import 'form_control_layout';
@import 'form_control_layout_delimited';
@import 'form_control_layout_icons';
Expand Down
1 change: 0 additions & 1 deletion src/components/form/radio/_index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
@import '../variables';
@import 'radio';
@import 'radio_group';
3 changes: 0 additions & 3 deletions src/components/form/range/_index.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
@import 'variables';
@import 'mixins';

@import 'range';
@import 'range_highlight';
@import 'range_input';
Expand Down
1 change: 0 additions & 1 deletion src/components/form/switch/_index.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
@import '../variables';
@import 'switch';
1 change: 0 additions & 1 deletion src/components/loading/_index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import 'variables';
@import 'mixins';
@import 'loading_kibana';
@import 'loading_chart';
@import 'loading_content';
Expand Down
2 changes: 0 additions & 2 deletions src/components/modal/_index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
@import '../form/variables';

@import 'modal';
1 change: 0 additions & 1 deletion src/components/panel/_index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
@import 'variables';
@import 'mixins';
@import 'panel';
1 change: 0 additions & 1 deletion src/components/popover/_index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import 'variables';
@import 'mixins';
@import 'popover';
@import 'popover_title';
@import 'popover_footer';
Expand Down
2 changes: 0 additions & 2 deletions src/components/search_bar/_search_bar.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../form/variables';

.euiSearchBar__searchHolder {
min-width: $euiFormMaxWidth / 2;
}
Expand Down
2 changes: 0 additions & 2 deletions src/components/table/_responsive.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../panel/mixins';

.euiTableRowCell__mobileHeader {
// Don't display by default unless table is responsive
display: none;
Expand Down
2 changes: 0 additions & 2 deletions src/components/toggle/_toggle.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../form/switch/mixins';

.euiToggle {
position: relative;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import 'variables';
@import 'form_control_layout/variables';
@import 'form_control_layout/mixins';
@import '../variables/form';
@import '../variables/form_control_layout';
@import 'form_control_layout';
johnbarrierwilson marked this conversation as resolved.
Show resolved Hide resolved

@mixin euiPlaceholderPerBrowser {
// sass-lint:disable-block no-vendor-prefixes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../variables';

@mixin euiFormControlLayoutPadding($numOfIcons, $side: 'right', $compressed: false) {
$firstIconSize: $euiFormControlPadding + $euiSize + $euiFormControlPadding;
$secondIconSize: $euiFormControlPadding + $euiSize;
Expand Down Expand Up @@ -39,4 +37,4 @@
stroke: $euiColorEmptyShade;
stroke-width: 2px; // increase thickness of icon at such a small size
}
}
}
9 changes: 9 additions & 0 deletions src/global_styling/mixins/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@
@import 'helpers';
@import 'states';
@import 'icons';

@import 'button';
@import 'form';
@import 'form_control_layout';
@import 'loading';
@import 'panel';
@import 'popover';
@import 'range';
@import 'switch';
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../variables';
@import 'form';

/**
* 1. Account for inner box-shadow style border
Expand Down
4 changes: 4 additions & 0 deletions src/global_styling/variables/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@
@import 'borders';
@import 'shadows';
@import 'z_index';

@import 'form';
@import 'form_control_layout';
johnbarrierwilson marked this conversation as resolved.
Show resolved Hide resolved
@import 'range';