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

[EuiHeader] Fix SASS globals & docs #3592

Merged
merged 4 commits into from
Jun 11, 2020
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
- Changed `responsive` and `max` behavior of `EuiBreadcrumbs` to always display collapsed items in popover [#3578](https://github.com/elastic/eui/pull/3578))
- Added `BREAKPOINTS` and `getBreakpoint` utilities [#3578](https://github.com/elastic/eui/pull/3578))
- Added `'any'` option to the `step` prop of the `EuiFieldNumber` ([#3562](https://github.com/elastic/eui/pull/3562))
- Moved all `EuiHeader` SASS variables to `global_styles` ([#3592](https://github.com/elastic/eui/pull/3592))

**Bug fixes**

- Added `display` prop to `EuiDataGridColumnSortingDraggable` to pass` displayAsText` prop correctly to the column sorting popover.([#3574](https://github.com/elastic/eui/pull/3574))
- Fixed `EuiCodeBlockImpl` testenv mock pass-through of `data-test-subj` attribute ([#3560](https://github.com/elastic/eui/pull/3560))
- Fixed DOM element creation issues in `EuiOverlayMask` by using lifecycle methods ([#3555](https://github.com/elastic/eui/pull/3555))
- Fixed `EuiComboBox`'s options list `zIndex` positioning when nested in other `zIndex` contexts ([#3551](https://github.com/elastic/eui/pull/3551))
- Fixed `euiHeaderAffordForFixed` mixin's use of header SASS variable ([#3592](https://github.com/elastic/eui/pull/3592))

**Breaking changes**

Expand Down
8 changes: 4 additions & 4 deletions src-docs/src/views/header/header_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,14 @@ export const HeaderExample = {
afford for the header height. EUI supplies a helper mixin that also
accounts for this height in flyouts and the collapsible nav. Simply
add{' '}
<EuiCode language="sass">@mixin euiHeaderAffordForFixed;</EuiCode>{' '}
<EuiCode language="scss">@include euiHeaderAffordForFixed;</EuiCode>{' '}
anywhere in your SASS.
</p>
</>
),
snippet: [
'<EuiHeader position="fixed" />',
'@mixin euiHeaderAffordForFixed;',
'@include euiHeaderAffordForFixed;',
],
demo: <HeaderPosition />,
},
Expand Down Expand Up @@ -320,8 +320,8 @@ export const HeaderExample = {
</p>
),
snippet: [
`<EuiHeader theme="dark" />
<EuiHeader />`,
`<EuiHeader theme="dark" position="fixed" />
<EuiHeader position="fixed" />`,
'@include euiHeaderAffordForFixed($euiHeaderHeightCompensation * 2);',
],
demo: <HeaderStacked />,
Expand Down
1 change: 0 additions & 1 deletion src/components/control_bar/_index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import '../header/variables';
@import '../nav_drawer/variables';
@import 'variables';
@import 'control_bar';
1 change: 0 additions & 1 deletion src/components/flyout/_mixins.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import '../header/variables';

@mixin euiFlyout {
border-left: $euiFlyoutBorder;
Expand Down
1 change: 0 additions & 1 deletion src/components/header/_index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Components
@import 'variables';
@import 'mixins';

@import 'header';
Expand Down
1 change: 0 additions & 1 deletion src/components/nav_drawer/_index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import '../header/variables';
@import 'variables';

// Components
Expand Down
2 changes: 2 additions & 0 deletions src/global_styling/mixins/_header.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../variables/header';

@mixin euiHeaderAffordForFixed($headerHeight: $euiHeaderHeightCompensation) {
// The `&` allows for grouping inside another specific body class.
// When not applied inside of another selector, it simply renders with the single class
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Note - these are also used by the EuiNavDrawer (/nav_drawer) component
// Themable colors
$euiHeaderBackgroundColor: $euiColorEmptyShade !default;
$euiHeaderBorderColor: $euiBorderColor !default;
Expand Down
1 change: 1 addition & 0 deletions src/global_styling/variables/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@

@import 'buttons';
@import 'form';
@import 'header';
@import 'panel';
@import 'tool_tip';