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

Fix IE11 bugs with Table and ToolBar. #9928

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
4 changes: 3 additions & 1 deletion tasks/ui_framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ module.exports = function (grunt) {
'--config=ui_framework/doc_site/webpack.config.js',
'--hot ',
'--inline',
'--content-base=ui_framework/doc_site/build'
'--content-base=ui_framework/doc_site/build',
'--host=0.0.0.0',
'--port=8020',
],
opts: { stdio: 'inherit' }
};
Expand Down
2 changes: 1 addition & 1 deletion ui_framework/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Development

* Start development server `npm run uiFramework:start`.
* View docs on `http://localhost:8080/`.
* View docs on `http://localhost:8020/`.

## What is this?

Expand Down
14 changes: 10 additions & 4 deletions ui_framework/components/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -134,29 +134,35 @@ $toolBarItsemSpacing: 10px;
* 1. Put 10px of space between each child.
* 2. If there is only one child, align it to the right. If you wanted it aligned right, you
* wouldn't use the Bar in the first place.
* 3. Children in the middle should center their content.
* 4. Fix an IE bug which causes the last child to overflow the container.
* 5. Fixing this bug means we now need to align the children to the right.
*/
@mixin barSection {
display: flex;
align-items: center;
flex: 1 1 auto;
margin-left: $toolBarSectionSpacing * 0.5;
margin-right: $toolBarSectionSpacing * 0.5;

&:not(:first-child):not(:last-child):not(:only-child) {
justify-content: center; /* 3 */
}

&:first-child {
margin-left: 0;
}

&:last-child {
margin-right: 0;
flex: 0 1 auto; /* 4 */
justify-content: flex-end; /* 5 */
}

&:only-child {
margin-left: auto; /* 1 */
}

& > * {
flex: 1 0 auto;
}

& > * + * {
margin-left: $toolBarItsemSpacing; /* 1 */
}
Expand Down
1 change: 0 additions & 1 deletion ui_framework/components/table/_table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
}

.kuiTable {
table-layout: fixed;
width: 100%;
border: $tableBorder;
border-collapse: collapse;
Expand Down
85 changes: 66 additions & 19 deletions ui_framework/dist/ui_framework.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
* 1. Put 10px of space between each child.
* 2. If there is only one child, align it to the right. If you wanted it aligned right, you
* wouldn't use the Bar in the first place.
* 3. Children in the middle should center their content.
* 4. Fix an IE bug which causes the last child to overflow the container.
* 5. Fixing this bug means we now need to align the children to the right.
*/
* {
box-sizing: border-box; }
Expand Down Expand Up @@ -41,20 +44,35 @@ body {
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-flex: 1;
-webkit-flex: 1 1 auto;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
margin-left: 25px;
margin-right: 25px; }
.kuiBarSection:not(:first-child):not(:last-child):not(:only-child) {
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
/* 3 */ }
.kuiBarSection:first-child {
margin-left: 0; }
.kuiBarSection:last-child {
margin-right: 0; }
margin-right: 0;
-webkit-box-flex: 0;
-webkit-flex: 0 1 auto;
-ms-flex: 0 1 auto;
flex: 0 1 auto;
/* 4 */
-webkit-box-pack: end;
-webkit-justify-content: flex-end;
-ms-flex-pack: end;
justify-content: flex-end;
/* 5 */ }
.kuiBarSection:only-child {
margin-left: auto;
/* 1 */ }
.kuiBarSection > * {
-webkit-box-flex: 1;
-webkit-flex: 1 0 auto;
-ms-flex: 1 0 auto;
flex: 1 0 auto; }
.kuiBarSection > * + * {
margin-left: 10px;
/* 1 */ }
Expand Down Expand Up @@ -928,7 +946,6 @@ body {
/* 2 */ }

.kuiTable {
table-layout: fixed;
width: 100%;
border: 2px solid #E4E4E4;
border-collapse: collapse;
Expand Down Expand Up @@ -1089,20 +1106,35 @@ body {
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-flex: 1;
-webkit-flex: 1 1 auto;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
margin-left: 25px;
margin-right: 25px; }
.kuiToolBarSection:not(:first-child):not(:last-child):not(:only-child) {
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
/* 3 */ }
.kuiToolBarSection:first-child {
margin-left: 0; }
.kuiToolBarSection:last-child {
margin-right: 0; }
margin-right: 0;
-webkit-box-flex: 0;
-webkit-flex: 0 1 auto;
-ms-flex: 0 1 auto;
flex: 0 1 auto;
/* 4 */
-webkit-box-pack: end;
-webkit-justify-content: flex-end;
-ms-flex-pack: end;
justify-content: flex-end;
/* 5 */ }
.kuiToolBarSection:only-child {
margin-left: auto;
/* 1 */ }
.kuiToolBarSection > * {
-webkit-box-flex: 1;
-webkit-flex: 1 0 auto;
-ms-flex: 1 0 auto;
flex: 1 0 auto; }
.kuiToolBarSection > * + * {
margin-left: 10px;
/* 1 */ }
Expand Down Expand Up @@ -1141,20 +1173,35 @@ body {
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-flex: 1;
-webkit-flex: 1 1 auto;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
margin-left: 25px;
margin-right: 25px; }
.kuiToolBarFooterSection:not(:first-child):not(:last-child):not(:only-child) {
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
/* 3 */ }
.kuiToolBarFooterSection:first-child {
margin-left: 0; }
.kuiToolBarFooterSection:last-child {
margin-right: 0; }
margin-right: 0;
-webkit-box-flex: 0;
-webkit-flex: 0 1 auto;
-ms-flex: 0 1 auto;
flex: 0 1 auto;
/* 4 */
-webkit-box-pack: end;
-webkit-justify-content: flex-end;
-ms-flex-pack: end;
justify-content: flex-end;
/* 5 */ }
.kuiToolBarFooterSection:only-child {
margin-left: auto;
/* 1 */ }
.kuiToolBarFooterSection > * {
-webkit-box-flex: 1;
-webkit-flex: 1 0 auto;
-ms-flex: 1 0 auto;
flex: 1 0 auto; }
.kuiToolBarFooterSection > * + * {
margin-left: 10px;
/* 1 */ }
Expand Down
1 change: 1 addition & 0 deletions ui_framework/doc_site/src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require('./main.scss');

import 'babel-core/polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
Expand Down