Skip to content

Commit

Permalink
autoprefixer config
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta committed Oct 29, 2018
1 parent 2352692 commit 66ed56e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 33 deletions.
2 changes: 1 addition & 1 deletion bin/packages/post-css-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ module.exports = [
},
},
} ),
require( 'autoprefixer' ),
require( 'autoprefixer' )( { grid: true } ),
require( 'postcss-color-function' ),
];
16 changes: 2 additions & 14 deletions packages/block-library/src/media-text/editor.scss
Original file line number Diff line number Diff line change
@@ -1,44 +1,32 @@
.wp-block-media-text .__resizable_base__ {
-ms-grid-column: 1;
-ms-grid-column-span: 2;
-ms-grid-row: 2;
grid-column: 1 / -1;
grid-column: 1 / span 2;
grid-row: 2;
}

.wp-block-media-text .editor-media-container__resizer {
-ms-grid-column: 1;
-ms-grid-row: 1;
grid-column: 1;
grid-row: 1;
align-self: center;
-ms-grid-row-align: center;
// The resizer sets a inline width but as we are using a grid layout,
// we set the width on container.
width: 100% !important;
}

.wp-block-media-text.has-media-on-the-right .editor-media-container__resizer {
-ms-grid-column: 2;
-ms-grid-row: 1;
grid-column: 2;
grid-row: 1;
}

.wp-block-media-text .editor-inner-blocks {
word-break: break-word;
-ms-grid-column: 2;
-ms-grid-row: 1;
grid-column: 2;
grid-row: 1;
text-align: initial;
padding: 0 8% 0 8%;
-ms-grid-row-align: center;
align-self: center;
}

.wp-block-media-text.has-media-on-the-right .editor-inner-blocks {
-ms-grid-column: 1;
-ms-grid-row: 1;
grid-column: 1;
grid-row: 1;
}
Expand Down
22 changes: 4 additions & 18 deletions packages/block-library/src/media-text/style.scss
Original file line number Diff line number Diff line change
@@ -1,51 +1,37 @@
.wp-block-media-text,
.wp-block-media-text.aligncenter {
display: -ms-grid;
display: grid;
}

.wp-block-media-text {
-ms-grid-rows: auto;
grid-template-rows: auto;
-ms-grid-columns: 50% 1fr;
grid-template-columns: 50% auto;
-ms-grid-column-align: center;
align-items: center;
grid-template-columns: 50% 1fr;
.has-media-on-the-right {
-ms-grid-columns: 1fr 50%;
grid-template-columns: auto 50%;
grid-template-columns: 1fr 50%;
}
}

.wp-block-media-text .wp-block-media-text__media {
-ms-grid-column: 1;
-ms-grid-row: 1;
grid-column: 1;
grid-row: 1;
margin: 0;
-ms-grid-row-align: center;
align-self: center;
}

.wp-block-media-text .wp-block-media-text__content {
-ms-grid-column: 2;
-ms-grid-row: 1;
grid-column: 2;
grid-row: 1;
word-break: break-word;
padding: 0 8% 0 8%;
-ms-grid-row-align: center;
align-self: center;
}

.wp-block-media-text.has-media-on-the-right .wp-block-media-text__media {
-ms-grid-column: 2;
-ms-grid-row: 1;
grid-column: 2;
grid-row: 1;
}

.wp-block-media-text.has-media-on-the-right .wp-block-media-text__content {
-ms-grid-column: 1;
-ms-grid-row: 1;
grid-column: 1;
grid-row: 1;
}
Expand Down

0 comments on commit 66ed56e

Please sign in to comment.